© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
Benjámin

Multi tenancy Dashboard redirect loop

I'm trying to work with multi tenancy in my application.
The tenant model is called
Account
Account
, and I set it on my
PanelProvider
PanelProvider
like so:
return $panel
...
->tenant(Account::class, slugAttribute: 'slug');
return $panel
...
->tenant(Account::class, slugAttribute: 'slug');

(There is no
->path(...)
->path(...)
, the whole application is filament.)
Works perfectly with the slugs like
example.test/tenant
example.test/tenant
.
Subdomains are cool, so I wanted to make
tenant.example.test
tenant.example.test
instead, so I tryed:
return $panel
...
->tenant(Account::class, slugAttribute: 'slug')
->tenantDomain('{tenant:slug}.example.test');
return $panel
...
->tenant(Account::class, slugAttribute: 'slug')
->tenantDomain('{tenant:slug}.example.test');

It didn't work, I got "The page isn’t redirecting properly" error, I tried to figure out why.
On default I run local projects with laragon (working on Windows 11 btw), but I made it work previously for another project, but I couldn't make it work this time.
After some time I gave up with Laragon and tried to run it with
php artisan serve --host="example.test"
php artisan serve --host="example.test"
.
Same problem, but I found out that only the Dashboard throws this error, so I opened up the vendor folder and tried to catch the error.
I ended up with the
RedirectToTenantController
RedirectToTenantController
, and this controller redirects every time to the same url.
$url = $panel->getUrl($tenant);
dd($url, url()->current()); // This is both: 'http://tenant.example.test'
...
return redirect($url);
$url = $panel->getUrl($tenant);
dd($url, url()->current()); // This is both: 'http://tenant.example.test'
...
return redirect($url);

I only had a custom widget on the dashboard, I commented it, also commented
->discoverWidgets()
->discoverWidgets()
.
I even tried to make a brand new project with only these details, but same happened.
What am I missing, or what could be the problem, and how can I solve it?
Solution
Fixed in v3.2.56
Fixes issue with tenancy route registration order.
GitHub
Release v3.2.57 · filamentphp/filament
What's Changed

adding hook classes for sub navigation by @atmonshi in #11949
Add missing de translations for relation edit modal by @philippbuerger in #11954
Update 03-creating-records.md by @...
Release v3.2.57 · filamentphp/filament
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Conditional Multi-Tenancy Panel Redirect
FilamentFFilament / ❓┊help
2y ago
Multi Tenancy within multi tenancy
FilamentFFilament / ❓┊help
2y ago
Multi Tenancy
FilamentFFilament / ❓┊help
2y ago
multi-tenancy
FilamentFFilament / ❓┊help
2y ago