@farisfaikar did you solved the issue? I have the same problem here...
Feb 29, 2024
4
Level 1
"This page has expired" error when submitting tenant admin login (Laravel 10, Livewire 2, TenancyForLaravel 3)
For context, I'm using Livewire 2. I've read the docs for livewire integration. And I have added this in config/livewire.php:
'middleware_group' => [
'web',
'universal',
InitializeTenancyByDomain::class, // or whatever tenancy middleware you use
],
That didn't work, so I tried pasting the Livewire 3 code too:
public function boot(): void
{
// ...
Livewire::setUpdateRoute(function ($handle) {
return Route::post('/livewire/update', $handle)
->middleware(
'web',
'universal',
InitializeTenancyByDomain::class, // or whatever tenancy middleware you use
);
});
}
Which obviously didn't work too as I'm using Livewire 2. I've also uncommented this line in tenancy.features config:
Stancl\Tenancy\Features\UniversalRoutes::class,
And added this to app/Http/Kernel.php:
'universal' => [],
Thus universal routes should be enabled (I hope I did that right). The error I get (using debugbar) when I log in suggests that it seems to be a CSRF token mismatch issue. Any help would be greatly appreciated, thank you
Please or to participate in this conversation.