© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago
Clay Bitner

Getting Tenant details into custom navigation

I'm trying to add a custom navigation item to add a link to what is set as the tenant's Base Channel. But I can't seem to get access to the Filament::getTenant() function when adding the NavigationItems.

->navigationItems([
                NavigationItem::make('Edit Main Channel')
                    ->url(fn (): string => ChannelResource::getUrl('edit', [$record=Filament::getTenant()->baseChannel()]))
                    ->sort(2)
            ])
->navigationItems([
                NavigationItem::make('Edit Main Channel')
                    ->url(fn (): string => ChannelResource::getUrl('edit', [$record=Filament::getTenant()->baseChannel()]))
                    ->sort(2)
            ])


I get the error that Filament:getTenant() returns null.
But once inside a separate page, it works properly.
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

Getting custom resource page into navigation sidebar
FilamentFFilament / ❓┊help
3y ago
Get tenant on a custom NavigationItem
FilamentFFilament / ❓┊help
2y ago
Multi tenant navigation panel?
FilamentFFilament / ❓┊help
2y ago
Adding custom select similar to tenant selection in navigation
FilamentFFilament / ❓┊help
3y ago