© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Felix Schmid

Dynamically set current panel

I'm building an application that consists of three panels: Admin, tenant, and customer. The admin panel is within our application domain, e.g., admin.com. Users should be able to register as a tenant where every tenant model has a database field
domain
domain
. The tenant panel should be available at the given
tenants.domain
tenants.domain
database field / domain.

This is where it gets tricky. The customers of our tenants should be able to register as well and can also specify a custom subdomain/domain. This domain is stored in
customers.domain
customers.domain
. Now I somehow need to dynamically decide which panel to show. If the request host is a tenant domain, it should render the
tenant
tenant
panel, and if it's a customer domain, it should render the
customer
customer
panel (where I later need to inject
tenant
tenant
branding information).

I've already tried using a middleware that checks the current domain (this part works) and setting the current panel via
Filament::setCurrentPanel($panel)
Filament::setCurrentPanel($panel)
, but it does not reliably render the correct panel. I've registered the middleware via the Laravel 11
bootstrap/app.php
bootstrap/app.php
bootstrapping file. The
path
path
property for all three panels is set to
/
/
. While the
domain
domain
of the admin panel is set to our domain, I cannot specify it for the
tenant
tenant
and
customer
customer
panels.

Has anyone encountered the same problem already or have any other ideas on how to best solve this problem? Any help is really appreciated 🙏
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

set $columnSpan dynamically?
FilamentFFilament / ❓┊help
3y ago
Get Current Panel id issue
FilamentFFilament / ❓┊help
3y ago
Set description for CheckboxList dynamically
FilamentFFilament / ❓┊help
2y ago
Set the HelperText attribute dynamically
FilamentFFilament / ❓┊help
3y ago