© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
3 replies
Zoltar

Navigation Item use isActiveWhen()

i tried to use custom navigation item in my panel

NavigationItem::make('ActivityResource-Index')
                    ->url(fn (): string => ActivityResource::getUrl('index'))
                    ->icon('heroicon-o-presentation-chart-line')
                    ->isActiveWhen(fn () => request()->routeIs(ActivityResource::getRouteBaseName()))
                    ->sort(1),
NavigationItem::make('ActivityResource-Index')
                    ->url(fn (): string => ActivityResource::getUrl('index'))
                    ->icon('heroicon-o-presentation-chart-line')
                    ->isActiveWhen(fn () => request()->routeIs(ActivityResource::getRouteBaseName()))
                    ->sort(1),


Navigation is ok but i cant see active page
How do I set isActiveWhen to works correct?

thanks
Solution
Fixed:

I use php artisan route:list to see correct view
->isActiveWhen(fn () => request()->routeIs('filament.employee.resources.activities.index'))
->isActiveWhen(fn () => request()->routeIs('filament.employee.resources.activities.index'))
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Navigation Item Sorting
FilamentFFilament / ❓┊help
13mo ago
Navigation item bottom
FilamentFFilament / ❓┊help
16mo ago
navigation item disabled
FilamentFFilament / ❓┊help
2y ago
navigationitem isActiveWhen()
FilamentFFilament / ❓┊help
17mo ago