The issue was with order in which the middlewares were being applied. I added $middlewarePriority
to app/Http/Kernel.php and ordered the middlewares in a way that the SetLocale runs first and then HandleInertiaRequests.
See the code snippet below:
protected $middlewarePriority = [
\App\Http\Middleware\SetLocale::class,
\App\Http\Middleware\HandleInertiaRequests::class
];
veggigit liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community