@@ -278,7 +278,7 @@ |
||
| 278 | 278 | |
| 279 | 279 | // https://softonsofa.com/laravel-querying-any-level-far-relations-with-simple-trick/ |
| 280 | 280 | // because Eloquent hasManyThrough cannot get through more than one deep relationship |
| 281 | - $object->load([$relation => function ($q) use (&$createdValue, $belongsTo) { |
|
| 281 | + $object->load([$relation => function($q) use (&$createdValue, $belongsTo) { |
|
| 282 | 282 | if ($belongsTo) { |
| 283 | 283 | $createdValue = $q->first(); |
| 284 | 284 | } else { |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | { |
| 12 | 12 | public function register() |
| 13 | 13 | { |
| 14 | - $this->app->bind('master', function () { |
|
| 14 | + $this->app->bind('master', function() { |
|
| 15 | 15 | return new MasterService(); |
| 16 | 16 | }); |
| 17 | 17 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | public function boot() |
| 28 | 28 | { |
| 29 | - $this->mergeConfigFrom(__DIR__ . '/../config/master.php', 'master-data'); |
|
| 29 | + $this->mergeConfigFrom(__DIR__.'/../config/master.php', 'master-data'); |
|
| 30 | 30 | |
| 31 | 31 | $databasePath = __DIR__.'/../database/migrations'; |
| 32 | 32 | $this->loadMigrationsFrom($databasePath); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | if (class_exists(Application::class)) { |
| 35 | 35 | $this->publishes( |
| 36 | 36 | [ |
| 37 | - __DIR__ . '/../config/master.php' => config_path('master-data.php'), |
|
| 37 | + __DIR__.'/../config/master.php' => config_path('master-data.php'), |
|
| 38 | 38 | ], |
| 39 | 39 | 'config' |
| 40 | 40 | ); |
@@ -38,10 +38,10 @@ |
||
| 38 | 38 | protected static function boot() |
| 39 | 39 | { |
| 40 | 40 | parent::boot(); // TODO: Change the autogenerated stub |
| 41 | - static::updating(function ($instance) { |
|
| 41 | + static::updating(function($instance) { |
|
| 42 | 42 | Cache::put('districts.'.$instance->slug, $instance); |
| 43 | 43 | }); |
| 44 | - static::deleting(function ($instance) { |
|
| 44 | + static::deleting(function($instance) { |
|
| 45 | 45 | Cache::delete('districts.'.$instance->slug); |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -57,10 +57,10 @@ |
||
| 57 | 57 | protected static function boot() |
| 58 | 58 | { |
| 59 | 59 | parent::boot(); // TODO: Change the autogenerated stub |
| 60 | - static::updating(function ($instance) { |
|
| 60 | + static::updating(function($instance) { |
|
| 61 | 61 | Cache::put('cities.'.$instance->slug, $instance); |
| 62 | 62 | }); |
| 63 | - static::deleting(function ($instance) { |
|
| 63 | + static::deleting(function($instance) { |
|
| 64 | 64 | Cache::delete('cities.'.$instance->slug); |
| 65 | 65 | }); |
| 66 | 66 | } |
@@ -68,10 +68,10 @@ |
||
| 68 | 68 | protected static function boot() |
| 69 | 69 | { |
| 70 | 70 | parent::boot(); // TODO: Change the autogenerated stub |
| 71 | - static::updating(function ($instance) { |
|
| 71 | + static::updating(function($instance) { |
|
| 72 | 72 | Cache::put('states.'.$instance->slug, $instance); |
| 73 | 73 | }); |
| 74 | - static::deleting(function ($instance) { |
|
| 74 | + static::deleting(function($instance) { |
|
| 75 | 75 | Cache::delete('states.'.$instance->slug); |
| 76 | 76 | }); |
| 77 | 77 | } |
@@ -78,10 +78,10 @@ |
||
| 78 | 78 | protected static function boot() |
| 79 | 79 | { |
| 80 | 80 | parent::boot(); // TODO: Change the autogenerated stub |
| 81 | - static::updating(function ($instance) { |
|
| 81 | + static::updating(function($instance) { |
|
| 82 | 82 | Cache::put('countries.'.$instance->slug, $instance); |
| 83 | 83 | }); |
| 84 | - static::deleting(function ($instance) { |
|
| 84 | + static::deleting(function($instance) { |
|
| 85 | 85 | Cache::delete('countries.'.$instance->slug); |
| 86 | 86 | }); |
| 87 | 87 | } |
@@ -71,10 +71,10 @@ |
||
| 71 | 71 | protected static function boot() |
| 72 | 72 | { |
| 73 | 73 | parent::boot(); // TODO: Change the autogenerated stub |
| 74 | - static::updating(function ($instance) { |
|
| 74 | + static::updating(function($instance) { |
|
| 75 | 75 | Cache::put('currencies.'.$instance->slug, $instance); |
| 76 | 76 | }); |
| 77 | - static::deleting(function ($instance) { |
|
| 77 | + static::deleting(function($instance) { |
|
| 78 | 78 | Cache::delete('currencies.'.$instance->slug); |
| 79 | 79 | }); |
| 80 | 80 | } |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | { |
| 39 | 39 | parent::boot(); |
| 40 | 40 | |
| 41 | - static::addGlobalScope('alphabetical', function (Builder $builder) { |
|
| 41 | + static::addGlobalScope('alphabetical', function(Builder $builder) { |
|
| 42 | 42 | $builder->orderBy('name', 'asc'); |
| 43 | 43 | }); |
| 44 | - static::updating(function ($instance) { |
|
| 44 | + static::updating(function($instance) { |
|
| 45 | 45 | Cache::put('colors.'.$instance->slug, $instance); |
| 46 | 46 | }); |
| 47 | - static::deleting(function ($instance) { |
|
| 47 | + static::deleting(function($instance) { |
|
| 48 | 48 | Cache::delete('colors.'.$instance->slug); |
| 49 | 49 | }); |
| 50 | 50 | } |
@@ -37,10 +37,10 @@ |
||
| 37 | 37 | protected static function boot() |
| 38 | 38 | { |
| 39 | 39 | parent::boot(); // TODO: Change the autogenerated stub |
| 40 | - static::updating(function ($instance) { |
|
| 40 | + static::updating(function($instance) { |
|
| 41 | 41 | Cache::put('villages.'.$instance->slug, $instance); |
| 42 | 42 | }); |
| 43 | - static::deleting(function ($instance) { |
|
| 43 | + static::deleting(function($instance) { |
|
| 44 | 44 | Cache::delete('villages.'.$instance->slug); |
| 45 | 45 | }); |
| 46 | 46 | } |