master
cody 4 months ago
parent 0b6bcdba06
commit 72ccf05e8c

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

Loading…
Cancel
Save