Multi Tenancy - Fixed subdomain and dynamic tenant domain

Hey everyone, I was wondering if it's possible to achieve the following using Filament's Multi tenancy capabilities. I'd like to have a fixed subdomain, say "quote" and then the rest of the domain is dynamic (the tenant table has a domain column) So it would essentially look like this: quote.tenant-domain.com The below is how the ->tenant and ->tenantDomain methods are used, however, the quote subdomain here ->tenantDomain('quote.{tenant:domain}'); causes a redirect loop which I'm not sure how to resolve.
->tenant(Tenant::class, slugAttribute: 'domain')
->tenantDomain('quote.{tenant:domain}');
->tenant(Tenant::class, slugAttribute: 'domain')
->tenantDomain('quote.{tenant:domain}');
I can sort of achieve the fixed quote subdomain but only when editing the vendor/filament/filament/routes/web.php file from this:
$tenantDomain = $panel->getTenantDomain();
$tenantDomain = $panel->getTenantDomain();
to this
$tenantDomain = $panel->hasTenancy() ? 'quote.' . $panel->getTenantDomain() : $panel->getTenantDomain();
$tenantDomain = $panel->hasTenancy() ? 'quote.' . $panel->getTenantDomain() : $panel->getTenantDomain();
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?