π How to Set Up Dynamic Subdomains for Filament Panels?
Hi all! π
I'm trying to set up dynamic subdomains in Filament, like this:
- store1.site.test β‘οΈ loads user panel for store1
- store2.site.test β‘οΈ loads user panel for store2
I want Filament to automatically detect the subdomain and load the correct panel without defining routes manually in
routes/web.php.
So far, I've configured:
1. UserPanelProvider
with ->domain('*.site.test')
2. Middleware to identify the store by the subdomain
But I keep getting redirection loops or timeouts. π
Any advice or examples would be greatly appreciated! π Thanks!2 Replies
Your problem is you will be matching on the domain, but then redirecting constantly