@@ -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 { |
@@ -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 | } |
@@ -44,10 +44,10 @@ |
||
44 | 44 | protected static function boot() |
45 | 45 | { |
46 | 46 | parent::boot(); // TODO: Change the autogenerated stub |
47 | - static::updating(function ($instance) { |
|
47 | + static::updating(function($instance) { |
|
48 | 48 | Cache::put('timezones.'.$instance->slug, $instance); |
49 | 49 | }); |
50 | - static::deleting(function ($instance) { |
|
50 | + static::deleting(function($instance) { |
|
51 | 51 | Cache::delete('timezones.'.$instance->slug); |
52 | 52 | }); |
53 | 53 | } |