AppLayout class — see Layout for how to wire them into the navigation areas.
NavigationItem
NavigationItem represents a single navigation link. Pass the route name and display label to make().
Icons
Icons use Lucide icon names:Route Parameters
Pass route parameters as the third argument tomake(), or use the params() method:
From Domain Object
When your models implementDomainObjectContract, you can build navigation items from the class (index/collection page) or an instance (show page). Title, icon, URL, and visibility are derived from the contract; when the URL is null (e.g. no permission), the item is hidden.
Collection (index): pass the class. The item uses the collection title and getDomainObjectCollectionUrl(). If that URL is null, the item is hidden.
getObjectUrl(). If the URL is null, the item is hidden.
fromDomainObject():
The URL is matched against your Laravel routes to get the route name and parameters. If the URL does not match a route, the item uses a direct
href and active state is determined by comparing the current request URL.Badges
Badges display counters or status indicators next to the item label:Conditional Visibility
Hide items based on permissions or conditions using a boolean or closure:Auto-Hide When Empty
UsehiddenIfNoItems() on a parent item to hide it automatically when all of its sub-items are hidden:
manage-users, the Settings parent item will also disappear.
Sub-Items
Create one level of nested navigation:Disabled Items
Disable an item to keep it visible but non-interactive:Disabled items render with reduced opacity and a not-allowed cursor.
NavigationSection
NavigationSection groups related items under a labeled, collapsible accordion with an optional colored icon.
Icon and Color
The section icon renders as a small rounded square. Set the color using an HSL hue value (0–360):Common hue values: Red (0), Orange (30), Yellow (60), Green (120), Cyan (180), Blue (220), Purple (280), Pink (330).
Collapsible Behavior
Sections are collapsible by default. The expanded/collapsed state is persisted inlocalStorage per section, so the user’s preference survives page reloads.
Auto-Hide Empty Sections
If all items in a section are hidden, the section itself is hidden automatically — no extra configuration needed.NavigationSecondaryItem
NavigationSecondaryItem creates external links that appear in the sidebar footer.
hidden() for conditional visibility.
Method Reference
NavigationItem
| Method | Parameters | Description |
|---|---|---|
make() | string $name, string $title, array $params = [] | Create a navigation item |
fromDomainObject() | DomainObjectContract|class-string<DomainObjectContract> $classOrInstance | Create from domain object (index or show); hidden when URL is null |
title() | string $title | Override the display title (chainable) |
href() | string $url | Use a direct URL instead of route name and params |
icon() | string $icon | Lucide icon name |
params() | array $params | Route parameters |
badge() | mixed $value, CoreVariant $variant | Add a badge |
items() | NavigationItem[] $items | Add sub-items |
hidden() | Closure|bool $condition | Hide based on condition |
hiddenIfNoItems() | — | Auto-hide when all sub-items are hidden |
disabled() | Closure|bool $condition = true | Make non-clickable |
NavigationSection
| Method | Parameters | Description |
|---|---|---|
make() | string $title, NavigationItem[] $items | Create a section |
icon() | string $icon | Lucide icon name |
color() | int $hue | HSL hue value (0–360) |
NavigationSecondaryItem
| Method | Parameters | Description |
|---|---|---|
make() | string $title, string $url | Create an external link |
icon() | string $icon | Lucide icon name |
hidden() | Closure|bool $condition | Hide based on condition |