user(), 'locale'); if (in_array($chosen, UserSetting::LOCALES, true)) { app()->setLocale($chosen); } return $next($request); } }