2017-12-10 11:56:26 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shortcut for retrieving a setting value
|
|
|
|
*/
|
|
|
|
if (!function_exists('setting')) {
|
|
|
|
function setting($key, $value = null)
|
|
|
|
{
|
2017-12-13 07:09:26 +08:00
|
|
|
$settingRepo = app('setting'); // defined in AppServiceProvider
|
|
|
|
if($value !== null) {
|
|
|
|
return $settingRepo->store($key, $value);
|
2017-12-10 11:56:26 +08:00
|
|
|
}
|
2017-12-13 07:09:26 +08:00
|
|
|
|
|
|
|
return $settingRepo->retrieve($key);
|
2017-12-10 11:56:26 +08:00
|
|
|
}
|
|
|
|
}
|