Skip to content

Instantly share code, notes, and snippets.

@ju5t
ju5t / Transaction.php
Created June 29, 2022 14:38 — forked from Patabugen/Transaction.php
Eloquent Model event hook to allow inserting primary keys into SQL Server tables with IDENTITY_INSERT = off
<?php
trait PrimaryKey
{
protected $primaryKey = 'TransactionID';
public static function bootPrimaryKey()
{
static::creating(function(self $model) {
$pkColumn = $model->primaryKey;
$tableName = $model->table;
@ju5t
ju5t / semantic-commit-messages.md
Created December 8, 2018 21:48 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example