diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index e6be6e1c..93e48967 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -30,7 +30,6 @@ class Kernel extends HttpKernel \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\AfterSessionBooted::class, \App\Http\Middleware\DetectLanguagePrefer::class, ], diff --git a/app/Http/Middleware/AfterSessionBooted.php b/app/Http/Middleware/AfterSessionBooted.php deleted file mode 100644 index fdc5ddd6..00000000 --- a/app/Http/Middleware/AfterSessionBooted.php +++ /dev/null @@ -1,33 +0,0 @@ -call($job); - } - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/DetectLanguagePrefer.php b/app/Http/Middleware/DetectLanguagePrefer.php index bcc9e9b2..866e14c6 100644 --- a/app/Http/Middleware/DetectLanguagePrefer.php +++ b/app/Http/Middleware/DetectLanguagePrefer.php @@ -29,8 +29,6 @@ class DetectLanguagePrefer } app()->setLocale($locale); - AfterSessionBooted::$jobs[] = function () { - session(['locale' => config('app.locale')]); - }; + session(['locale' => config('app.locale')]); } }