diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 2ae462d..3e9edb7 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -10,7 +10,6 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Http\Request; use Illuminate\Routing\Controller as BaseController; -use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; @@ -206,12 +205,12 @@ class Controller extends BaseController $cacheKey = "pagination.{$currentRoutePath}"; $pagination = $pagination ?? ItemsPerPaginationEnum::twelve; $pagination = ToolboxHelper::getValidatedEnum( - Cache::get($cacheKey, $pagination->value()), + Session::get($cacheKey, $pagination->value()), 'pagination', '\App\Enums\Pagination\ItemsPerPaginationEnum', ); - if (Cache::get($cacheKey) !== $pagination) { - Cache::put($cacheKey, $pagination); + if (Session::get($cacheKey) !== $pagination) { + Session::put($cacheKey, $pagination); } $query = $query->paginate($pagination); return $query; @@ -226,12 +225,12 @@ class Controller extends BaseController protected function setTheme(Request $request): \Illuminate\Http\RedirectResponse { $theme = ToolboxHelper::getValidatedEnum( - $request->theme ?: Cache::get('theme', BootstrapThemeEnum::light->value()), + $request->theme ?: Session::get('theme', BootstrapThemeEnum::light->value()), 'theme', - '\App\Http\Controllers\BootstrapThemeEnum', + '\App\Enums\Theme\BootstrapThemeEnum', ); - if (Cache::get("theme") !== $theme) { - Cache::put("theme", $theme); + if (Session::get('theme') !== $theme) { + Session::put('theme', $theme); } return redirect()->back()->with('success', __('crud.messages.theme_updated')); } diff --git a/package-lock.json b/package-lock.json index d32109c..6766a63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2707,9 +2707,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001600", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", - "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", + "version": "1.0.30001687", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", + "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", "dev": true, "funding": [ { diff --git a/resources/views/bo/layout.blade.php b/resources/views/bo/layout.blade.php index d3b66ba..2c91920 100644 --- a/resources/views/bo/layout.blade.php +++ b/resources/views/bo/layout.blade.php @@ -7,7 +7,7 @@ @use('\App\Enums\Theme\BootstrapThemeEnum', 'BootstrapThemeEnum') - +name() }}"> @include('bo.layouts.header') diff --git a/resources/views/bo/layouts/header.blade.php b/resources/views/bo/layouts/header.blade.php index e88fc4c..9026d21 100644 --- a/resources/views/bo/layouts/header.blade.php +++ b/resources/views/bo/layouts/header.blade.php @@ -45,8 +45,8 @@