Tell Filament to refresh navigation badges
I display my navigation badges using:
When someone vets a photo from my custom page, I decrement the count by 1:
How can I tell the front end navigation to refresh so my badge shows the correct number immediately after vetting?
I attempted to refresh using a javascript event, but this was on suggestion of ChatGPT and it doesn't seem like refreshNavigation exists:
3 Replies
Solution
Should be
$wire.$dispatch('refresh-sidebar')@Dennis Koch Amazing! Thank you. I am using in my custom page to trigger the refresh. Is this the suggested approach or should I be doing it differently?
You can just use
$this->dispatch('refresh-sidebar') from the backend.