key); }); } /** * @param string $key * @param $default * @return mixed */ public static function getValueByKey(string $key, $default = null) { return Cache::rememberForever(self::CACHE_TAG .':'. $key, function () use ($default, $key) { $configuration = self::find($key); return $configuration ? $configuration->value : $default; }); } }