diff --git a/packages/panels/docs/06-navigation.md b/packages/panels/docs/06-navigation.md index 78d118541ad..4e0c22a79f8 100644 --- a/packages/panels/docs/06-navigation.md +++ b/packages/panels/docs/06-navigation.md @@ -97,7 +97,8 @@ public function panel(Panel $panel): Panel ->icon('heroicon-o-shopping-cart'), NavigationGroup::make() ->label('Blog') - ->icon('heroicon-o-pencil'), + ->icon('heroicon-o-pencil') + ->url('/blogs'), NavigationGroup::make() ->label(fn (): string => __('navigation.settings')) ->icon('heroicon-o-cog-6-tooth') @@ -147,6 +148,19 @@ public function panel(Panel $panel): Panel } ``` +### Making navigation groups redirect to a URL + +By default, navigation groups only serve as a label for the items within them. You may make a navigation group redirect to a URL by calling `url()` on the `NavigationGroup` object: + +```php +use Filament\Navigation\NavigationGroup; + +NavigationGroup::make() + ->label('Blogs') + ->icon('heroicon-o-pencil') + ->url('/blogs'); +``` + ## Collapsible sidebar on desktop To make the sidebar collapsible on desktop as well as mobile, you can use the [configuration](configuration):