Brand Logo Height. brandLogoHeight
Hi. How can I specify a brandLogoHeight for the login page, and one for the navBar ?
As seen on https://filamentphp.com/docs/4.x/styling/overview#adding-a-logo if I use ->brandLogoHeight('2rem'); it affects both login form and brandLogo.
I need a bigger login logo, and a smoller one in the navBar.
Thanks
3 Replies
Hi. You can set a default height using the brandlogoheight method on the panel, and then add an auth middleware to adjust the height for navbar
An example for tenant logo https://filamentmastery.com/articles/branding-in-filament-multi-tenant-customize-logo-colors
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.
Thanks! I had to use:
->brandLogoHeight( function() {
$route = request()->route()->getName() ;
$loginRoute = 'filament.user.auth.login' ;
$registerRoute = 'filament.user.auth.register' ;
if ( $route === $loginRoute || $route === $registerRoute ) {
return '10rem';
}
return 'auto';
})