Using a custom domain like the example below is not telling Livewire requests to be prefixed with the same subdomain subdomain1
in this example:
Route::domain('subdomain1.'.env('APP_DOMAIN', 'localhost'))
->middleware(['web',.....])
->as('app.')
->group(base_path('routes/app.php'));
The problem is that the default callback for Livewire fetch endpoint which is /livewire/message/{message}
is unfortunately using the root domain only and isn't based on where it has been called from. In my case from the subdomain1
and as you can guess this means a different storage of the session bag. It's a different session in the first place.
So storing in session for the sub-domain is not the same as storing in the session itself. Nevertheless, there are other customizations which I need in order to encapsulate Livewire usage based on each sub-domain, image I have a multi-tenancy based project and I need such segregation.