Add SetLocale middleware
MODIFY
app/Http/Kernel.php
app/Http/Kernel.php
@@ -34,6 +34,7 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
+ \App\Http\Middleware\SetLocale::class
],
'api' => [

ADD
app/Http/Middleware/SetLocale.php
+<?php
+
+namespace App\Http\Middleware;
+
+use Closure;
+
+class SetLocale {
+ public function handle($request, Closure $next) {
+ $user = \Auth::user();
+
+ \App::setLocale($user->language);
+
+ return $next($request);
+ }
+}

Add SetLocale middleware