Getting started
By default, Filament will register navigation items for each of your resources and custom pages. These classes contain static properties and methods that you can override, to configure that navigation item and its order:$navigationIcon supports the name of any Blade component, and passes a set of formatting classes to it. By default, the Blade Heroicons v1 package is installed, so you may use the name of any Heroicons v1 out of the box. However, you may create your own custom icon components or install an alternative library if you wish.
Navigation item badges
To add a badge next to the navigation item, you can use thegetNavigationBadge() method and return the content of the badge:
getNavigationBadge(), it will display using the primary Tailwind color by default. To style the badge contextually, return either danger, warning, success or secondary from the getNavigationBadgeColor() method:
Grouping navigation items
You may group navigation items by specifying a$navigationGroup property on a resource and custom page:
Customizing navigation groups
You may customize navigation groups by callingFilament::registerNavigationGroups() from the boot() method of any service provider, and passing NavigationGroup objects in order:
icon() for the groups, and make one collapsed() by default.
Ordering navigation groups
By usingregisterNavigationGroups(), you are defining a new order for the navigation groups in the sidebar. If you just want to reorder the groups and not define an entire NavigationGroup object, you may just pass the labels of the groups in the new order:
Active icons
You may assign a navigation icon which will be displayed for active items using the$activeNavigationIcon property:
getActiveNavigationIcon() method:
Registering custom navigation items
You may register custom navigation items by callingFilament::registerNavigationItems() from the boot() method of any service provider:
Conditionally hiding navigation items
You can also conditionally hide a navigation item by using thevisible() or hidden() methods, passing in a condition to check:
Disabling resource or page navigation items
To prevent resources or pages from showing up in navigation, you may use:Advanced navigation customization
TheFilament::navigation() method which can be called from the boot method of a ServiceProvider:
items() method:
groups() method:
Customizing the user menu
The user menu is featured in the top right corner of the admin layout. Itβs fully customizable. To register new items to the user menu, you should use a service provider:Customizing the account link
To customize the user account link at the start of the user menu, register a new item with theaccount array key:
Customizing the logout link
To customize the user logout link at the end of the user menu, register a new item with thelogout array key: