From 5d02ec59c1160e4dacf954e833658097dc966a2e Mon Sep 17 00:00:00 2001 From: Nico Stapelbroek Date: Sat, 27 Jan 2018 23:11:30 +0100 Subject: [PATCH] Fix a bug where the dynamic middleware would fail to load due to caching --- app/Http/Controllers/Dashboard/SettingsController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index 44201e57..354c0642 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -21,6 +21,7 @@ use GrahamCampbell\Binput\Facades\Binput; use Illuminate\Log\Writer; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Lang; use Illuminate\Support\Facades\Redirect; @@ -384,6 +385,10 @@ class SettingsController extends Controller Lang::setLocale(Binput::get('app_locale')); } + if (Binput::has('always_authenticate')) { + Artisan::call('route:cache'); + } + return Redirect::back()->withSuccess(trans('dashboard.settings.edit.success')); }