Fixed default empty app settings effecting blank app color
Fixes #265
Showing
1 changed file
with
1 additions
and
8 deletions
| ... | @@ -38,6 +38,7 @@ class SettingService | ... | @@ -38,6 +38,7 @@ class SettingService |
| 38 | */ | 38 | */ |
| 39 | public function get($key, $default = false) | 39 | public function get($key, $default = false) |
| 40 | { | 40 | { |
| 41 | + if ($default === false) $default = config('setting-defaults.' . $key, false); | ||
| 41 | $value = $this->getValueFromStore($key, $default); | 42 | $value = $this->getValueFromStore($key, $default); |
| 42 | return $this->formatValue($value, $default); | 43 | return $this->formatValue($value, $default); |
| 43 | } | 44 | } |
| ... | @@ -69,14 +70,6 @@ class SettingService | ... | @@ -69,14 +70,6 @@ class SettingService |
| 69 | return $value; | 70 | return $value; |
| 70 | } | 71 | } |
| 71 | 72 | ||
| 72 | - // Check the defaults set in the app config. | ||
| 73 | - $configPrefix = 'setting-defaults.' . $key; | ||
| 74 | - if (config()->has($configPrefix)) { | ||
| 75 | - $value = config($configPrefix); | ||
| 76 | - $this->cache->forever($cacheKey, $value); | ||
| 77 | - return $value; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | return $default; | 73 | return $default; |
| 81 | } | 74 | } |
| 82 | 75 | ... | ... |
-
Please register or sign in to post a comment