diff --git a/src/Setting/SettingEloquentStorage.php b/src/Setting/SettingEloquentStorage.php index 7f5b025b..bd80c719 100644 --- a/src/Setting/SettingEloquentStorage.php +++ b/src/Setting/SettingEloquentStorage.php @@ -32,7 +32,19 @@ public function all($fresh = false) */ public function get($key, $default = null, $fresh = false) { - return $this->all($fresh)->get($key, $default); + $configValue = $this->all($fresh)->get($key, $default); + + if (config('app_settings.allow_passthrough_config')) { + if (!$configValue) { + $configValue = config($key); + if (config('app_settings.exception_on_nodefined_config')) { + if (is_null($configValue)) { + throw new \Exception('Missing config value for ' . $key); + } + } + } + } + return $configValue ; } /**