@@ -9,11 +9,11 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | protected static function bootManageable() |
| 11 | 11 | { |
| 12 | - static::creating(function (Model $model) { |
|
| 12 | + static::creating(function(Model $model) { |
|
| 13 | 13 | $model->setManageable('created_by', 'creator'); |
| 14 | 14 | }); |
| 15 | 15 | |
| 16 | - static::updating(function (Model $model) { |
|
| 16 | + static::updating(function(Model $model) { |
|
| 17 | 17 | $model->setManageable('updated_by', 'editor'); |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | protected function setManageable(string $type, string $relation) |
| 42 | 42 | { |
| 43 | - if (! isset($this->{$type}) && Auth::check()) { |
|
| 43 | + if ( ! isset($this->{$type}) && Auth::check()) { |
|
| 44 | 44 | $this->{$type} = Auth::id(); |
| 45 | 45 | $this->setRelation($relation, Auth::user()); |
| 46 | 46 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function boot() |
| 16 | 16 | { |
| 17 | - Blueprint::macro('manageable', function ($bigIntegers = true, $foreignTable = 'users', $foreignKey = 'id') { |
|
| 17 | + Blueprint::macro('manageable', function($bigIntegers = true, $foreignTable = 'users', $foreignKey = 'id') { |
|
| 18 | 18 | $bigIntegers |
| 19 | 19 | ? $this->unsignedBigInteger('created_by')->nullable()->index() |
| 20 | 20 | : $this->unsignedInteger('created_by')->nullable()->index(); |