© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
Abel Cobreros

Refresh sub navigation after save

I have created an edit page for a Resource that should only show based on a field value. I am using the canAccess static method to check the value in the record and it works great, if the value is not valid and you try to access the page you get a 403 error and the sub-navigation item is added/removed accordingly but I need to manually refresh the page to actually see the change in the sub-navigation.

Is there a way to force the sub-navigation to refresh after the form is saved to automatically add or remove the link to the page?
Solution
Ok so the solution I've found for now is to overwrite the getRedirectUrl() method on the Edit class:

protected function getRedirectUrl(): ?string
{
    // Reload page after save to make sure that the sub-navigation menu is
    // reloaded to hide/display items depending on certain values.
    return MemberResource::getUrl('edit', ['record' => $this->record]);
}
protected function getRedirectUrl(): ?string
{
    // Reload page after save to make sure that the sub-navigation menu is
    // reloaded to hide/display items depending on certain values.
    return MemberResource::getUrl('edit', ['record' => $this->record]);
}


I just redirect to the same page the form I need to check is and it just works.
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Sub Navigation
FilamentFFilament / ❓┊help
11mo ago
Sub navigation
FilamentFFilament / ❓┊help
3y ago
Sub navigation
FilamentFFilament / ❓┊help
3y ago
SUB_NAVIGATION Hook
FilamentFFilament / ❓┊help
17mo ago