|
|
|
@ -14,9 +14,7 @@ class Config extends SoftDeletesModel
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static function getValueByKey($key)
|
|
|
|
public static function getValueByKey($key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$config = Cache::remember('config_array', 300, function () {
|
|
|
|
$config = self::pluck('value', 'key')->toArray();
|
|
|
|
return self::pluck('value', 'key')->toArray();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (isset($config[$key])) {
|
|
|
|
if (isset($config[$key])) {
|
|
|
|
return $config[$key];
|
|
|
|
return $config[$key];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|