@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | protected static function bootHasSettingsField() |
| 24 | 24 | { |
| 25 | - static::saving(function (self $model) { |
|
| 25 | + static::saving(function(self $model) { |
|
| 26 | 26 | $model->fixSettingsValue(); |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function getSettingsValue(): array |
| 35 | 35 | { |
| 36 | 36 | if (config('model_settings.settings_table_use_cache')) { |
| 37 | - return cache()->rememberForever($this->getSettingsCacheKey(), function () { |
|
| 37 | + return cache()->rememberForever($this->getSettingsCacheKey(), function() { |
|
| 38 | 38 | return $this->__getSettingsValue(); |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function getSettingsAttribute($value): string |
| 27 | 27 | { |
| 28 | - if (is_array($this->defaultSettings) && ! empty($this->defaultSettings)) { |
|
| 28 | + if (is_array($this->defaultSettings) && !empty($this->defaultSettings)) { |
|
| 29 | 29 | return $value ? array_merge(json_decode($value, true), $this->defaultSettings) : $this->defaultSettings; |
| 30 | 30 | } |
| 31 | 31 | |