user()) && ($request->user()->locale)) { $language = $request->user()->locale; // App setting preference } elseif ($settings->locale != '') { $language = $settings->locale; } } \App::setLocale(Helper::mapLegacyLocale($language)); return $next($request); } }