Installation:
composer require jeffersongoncalves/filament-logo
Run the publish command to generate the configuration (if needed):
php artisan vendor:publish --provider="JeffersonGoncalves\FilamentLogo\FilamentLogoServiceProvider"
Register the Plugin:
Add the plugin to your app/Providers/Filament/AdminPanelProvider.php:
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
\JeffersonGoncalves\FilamentLogo\FilamentLogoPlugin::make(),
]);
}
First Use Case: The plugin automatically injects the Filament logo into the panel header on mobile devices. No additional configuration is required for basic usage.
Default Behavior:
Customization:
/* app/filament/resources/css/filament/logo.css */
.filament-logo {
width: 120px;
margin-right: 1rem;
}
php artisan vendor:publish --tag=filament-logo-assets
Then update resources/views/vendor/filament-logo/logo.blade.php.Conditional Rendering:
\JeffersonGoncalves\FilamentLogo\FilamentLogoPlugin::make()
->canRender(function (User $user) {
return $user->cannot('view-logo');
})
Integration with Themes:
CSS Conflicts:
.filament-logo, the logo may disappear or misalign. Use !important sparingly and inspect the rendered HTML/CSS.Mobile Detection:
tailwind.config.js), the logo may not appear as expected.Asset Publishing:
--tag=filament-logo-assets) will retain the default logo, even if you replace files locally.Logo Not Showing?:
AdminPanelProvider..filament-logo or its parent container.Custom Logo Not Loading:
php artisan view:clear
resources/views/vendor/filament-logo/logo.blade.php.Dynamic Logo Logic:
FilamentLogoPlugin::make()
->getLogoUrl(function () {
return Logo::where('panel', 'admin')->first()->url;
});
Multi-Panel Support:
$panel->plugins([FilamentLogoPlugin::make()->forPanel('tenant')]);
Localization:
alt text or title in your language files:
// resources/lang/en/filament-logo.php
{
"logo_alt" = "Custom Admin Panel Logo"
}
How can I help you explore Laravel packages today?