Resolve Tenant before panel

I'm pretty sure it's a bust, but asking cause. AI doesn't know the answer and neither do I.
->colors(function () {
$tenant = Filament::getTenant();
if (!$tenant) {
return [];
}
$configService = app(ConfigService::class);
$themeService = new ThemeService($tenant, $configService);
return $themeService->getFilamentColors();
})
->colors(function () {
$tenant = Filament::getTenant();
if (!$tenant) {
return [];
}
$configService = app(ConfigService::class);
$themeService = new ThemeService($tenant, $configService);
return $themeService->getFilamentColors();
})
Solution:
Filament Mastery
Branding in Filament multi-tenant: Customize logo & colors - Filame...
Learn how to dynamically set logos and colors in a Filament multi-tenancy panel. Customize branding per tenant using middleware and database configurations.
Jump to solution
3 Replies
awcodes
awcodes6d ago
Where are you calling this? I think you would need to do it in a middleware and resolve the panel there.
Solution
Julien B. (aka yebor974)
Filament Mastery
Branding in Filament multi-tenant: Customize logo & colors - Filame...
Learn how to dynamically set logos and colors in a Filament multi-tenancy panel. Customize branding per tenant using middleware and database configurations.
Mack H
Mack HOP5d ago
Will try when I get into the office, but yes that should work and thanks.

Did you find this page helpful?