FEATURE: refactorize settings

This commit is contained in:
Michal Kváček
2017-08-02 10:27:58 +02:00
parent e5d9ce682d
commit e8065c99c7
4 changed files with 37 additions and 37 deletions
+2 -2
View File
@@ -2,6 +2,7 @@
namespace App\CMS\Helpers;
use App\CMS\Repositories\Settings\Settings as SettingsRepository;
use App\Models\Settings as SettingsModel;
use Illuminate\Support\Facades\Cache;
@@ -78,8 +79,7 @@ class Settings
{
if (!self::$initialized) {
self::$settings = Cache::remember('settings', config('cache.settingCacheLifetime'), function () {
$model = new SettingsModel();
return $model->getAll();
app(SettingsRepository::class)->getAll();
});
}
}