|
|
@ -151,6 +151,8 @@ if (!function_exists('setting')) {
|
|
|
|
* @param $key
|
|
|
|
* @param $key
|
|
|
|
* @param mixed $default
|
|
|
|
* @param mixed $default
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @throws \Exception
|
|
|
|
|
|
|
|
*
|
|
|
|
* @return mixed|null
|
|
|
|
* @return mixed|null
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function setting($key, $default = null)
|
|
|
|
function setting($key, $default = null)
|
|
|
@ -161,6 +163,8 @@ if (!function_exists('setting')) {
|
|
|
|
$value = $settingRepo->retrieve($key);
|
|
|
|
$value = $settingRepo->retrieve($key);
|
|
|
|
} catch (SettingNotFound $e) {
|
|
|
|
} catch (SettingNotFound $e) {
|
|
|
|
return $default;
|
|
|
|
return $default;
|
|
|
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
|
|
|
|
return $default;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $value;
|
|
|
|
return $value;
|
|
|
|