F
Filament14mo ago
Mahdi

Is it possible to have multi-database tenancy

If it's possible, it would be nice to have documentation .
13 Replies
Dennis Koch
Dennis Koch14mo ago
Yes with separate packages like Tenancy for Laravel
raysaber
raysaber13mo ago
Hello, may I join? I have follow this guide https://github.com/filamentphp/filamentphp.com/pull/219 but still can't make it right, the tenant database already detected, but when I try to login in admin panel, it's try to connect to central database
GitHub
filament integration with Tenancywithlaravel Full Guide Article by...
a step by step guide which will take your application from single user to multi-tenant application
Dennis Koch
Dennis Koch13mo ago
Sounds like you didn't set the middelwares
raysaber
raysaber13mo ago
middleware on AdminPanelProvider?
Dennis Koch
Dennis Koch13mo ago
Yes
raysaber
raysaber13mo ago
I already add something like this
->middleware([
InitializeTenancyByDomain::class,
PreventAccessFromCentralDomains::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->middleware([
InitializeTenancyByDomain::class,
PreventAccessFromCentralDomains::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
Dennis Koch
Dennis Koch13mo ago
Try adding it at the end. You put it before the start of the session and auth.
raysaber
raysaber13mo ago
I try that at first, is there any place missing?
Dennis Koch
Dennis Koch13mo ago
If this isn't it, please open a new thread and provide some information on your setup.
raysaber
raysaber13mo ago
oke thank you, i'll try another way around first
Code IT
Code IT12mo ago
GitHub
GitHub - codeit-np/saas_boilerplate
Contribute to codeit-np/saas_boilerplate development by creating an account on GitHub.
Long-Blade
Long-Blade8mo ago
Hey, can someon help me with setting up multi database tenancy ? i cant figure this out
Mahdi
MahdiOP7mo ago
same with me
Want results from more Discord servers?
Add your server