FEATURE: refactorize settings
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user