| Install | |
|---|---|
composer require jeffersongoncalves/filament-refresh-sidebar |
|
| Latest Version: | 1.0.3 |
| PHP: | ^8.2 |

Filament Refresh Sidebar is a lightweight plugin designed to keep your Filament sidebar navigation in sync. It's particularly useful when you have dynamic navigation badges or menu items that depend on database changes, ensuring the sidebar updates automatically without a full page reload.
You can install the package via composer:
composer require jeffersongoncalves/filament-refresh-sidebar
Register the plugin in your Filament Panel Provider (typically app/Providers/Filament/AdminPanelProvider.php):
use JeffersonGoncalves\Filament\RefreshSidebar\RefreshSidebarPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ... other configuration
->plugins([
RefreshSidebarPlugin::make(),
]);
}
The plugin automatically listens for database notifications via Laravel Echo (if configured) and triggers a sidebar refresh when a new notification is received.
You can also manually trigger a sidebar refresh from any Livewire component by dispatching the refresh-sidebar event:
$this->dispatch('refresh-sidebar');
This is useful for updating navigation badges after custom actions like creating, updating, or deleting records.
You can run code analysis and formatting using the following commands:
# Run static analysis
composer analyse
# Format code
composer format
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.