Anyone Successfuly Upgraded to V3 with Stancl Tenancy for Laravel Tenant Identification Issue
Hi all, i am battling to upgrade to v3 with stancl for tenancy, has anyone successfully done so? The issue i am hitting is tenant identification when logging in (its trying to use central database instead of tenantdb)
I have adde to my adminserviceprovider this middleware
but seems not to be working
15 Replies
Hi, i'm trying to start new project with V3 and Stancl Tenancy, the problem that i found is here: i can login / logout and view the corret data for my tenant, but i'm getting this error:
Livewire page component layout view not found: [components.layouts.app]
I got this error only in the admin panel of the tenant, in the main domain i got 0 errors.
Some screen
I think that's unrelated to tenancy and was some different issue?
@cvc_web I got it working on my app, but I am still on Filament v3-beta. You might need to add the middelware for Livewire routes: https://livewire.laravel.com/docs/installation#configuring-livewires-update-endpoint
Laravel
Installation | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
i think that it's a problem with livewire 3 and tenancy. For example for livewire 2, i should editing the middleware_group in the config file, but now this middleware_group dosn't exist anymore in livewire 3.
See my last answer.
Edit: i put the code with web Universal and initiate tenant middleware and all work well
I have it working fine too, the problem in my case was that I was using the old livewire 2 configuration, same problem as @cCc , doing this fixes it: https://livewire.laravel.com/docs/installation#configuring-livewires-update-endpoint
Laravel
Installation | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Like this in my case:
//AppServiceProvider.php
Livewire::setUpdateRoute(function ($handle) {
return Route::post('/livewire/update', $handle)
->middleware([
'web',
'universal',
InitializeTenancyByDomain::class,
]);
});
yes updating livewire sorted it (I had old views in public folder)
add layout template on your view folder and call it like following:
or you can set as you want on the
livewire.layout
config
not lucky! its not working for me 😦did you check vendor folder under public?
No. Can you please tell me what to check? I tried with fresh installation.
no, I solved the middleware thing but the assets path is still missed up
and I can't set
'asset_helper_tenancy' => false
it will break all my website images
I don't know why this affect filament assets!!!Because it’s a global override. See the other thread you commented