Fix SetLocale middleware to only set locale when authenticated
MODIFY
app/Http/Middleware/SetLocale.php
app/Http/Middleware/SetLocale.php
@@ -6,9 +6,11 @@ use Closure;
class SetLocale {
public function handle($request, Closure $next) {
+ if (\Auth::check()) {
$user = \Auth::user();
\App::setLocale($user->language);
+ }
return $next($request);
}

Fix SetLocale middleware to only set locale when authenticated