marcelodelgado/filament-announcements
A Filament v5 plugin for institutional announcements and alerts on panel dashboards. Includes a severity-ordered widget, full CRUD resource with badges and bulk actions, per-user dismiss via pivot table, and automatic expiration using date windowsβno jobs required.
A Filament v5 plugin to display institutional announcements and alerts on your panel dashboard β with full CRUD, per-user dismiss, and automatic expiration.



AnnouncementResource with type badges, bulk actions and inline togglesstarts_at / expires_at date windows, no jobs required__() with publishable language filesinfo, warning, danger, success with Filament semantic colors| Dependency | Version |
|---|---|
| PHP | 8.2+ |
| Laravel | 11+ |
| Filament | 5.x |
| spatie/laravel-package-tools | ^1.16 |
Install via Composer:
composer require marcelodelgado/filament-announcements
Publish and run the migrations:
php artisan vendor:publish --tag="announcements-migrations"
php artisan migrate
Optionally publish config and views to customize them:
php artisan vendor:publish --tag="announcements-config"
php artisan vendor:publish --tag="announcements-views"
php artisan vendor:publish --tag="announcements-translations"
use Marcelodelgado\Announcements\AnnouncementsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(
AnnouncementsPlugin::make()
->pollingInterval('120s') // optional, default: '60s'
);
}
use Marcelodelgado\Announcements\Traits\HasAnnouncements;
class User extends Authenticatable
{
use HasAnnouncements;
}
That's it β the widget will appear on your dashboard and the Announcements menu item will show up in the sidebar.
After publishing, edit config/announcements.php:
| Key | Type | Default | Description |
|---|---|---|---|
permission_check |
null, string or Closure |
null |
Access control for the Resource. null = no extra check. string = Laravel Gate name. Closure = receives the authenticated user, must return bool. |
polling_interval |
string |
'60s' |
Fallback wire:poll interval for the widget when the panel plugin interval cannot be resolved. |
// config/announcements.php
// Using a Laravel Gate:
'permission_check' => 'manage-announcements',
// Using a closure:
'permission_check' => fn ($user) => $user->hasRole('admin'),
// Using Spatie Permission:
'permission_check' => fn ($user) => $user->can('manage-announcements'),
Widget β only shows announcements where is_active = true and the current time falls within the starts_at / expires_at window. Results are ordered with danger first, then by created_at descending.
Dismiss β when a user closes a dismissible announcement, the action is recorded in the announcement_user pivot table (dismissed_at). That announcement will never show again for that user. Non-dismissible announcements hide the close button entirely.
Expiration β handled purely by the query. No scheduled commands required.
The plugin ships with English strings. To add your own language, publish the translation files:
php artisan vendor:publish --tag="announcements-translations"
This will create lang/vendor/announcements/{locale}/announcements.php where you can override any string.
announcements:prune artisan commandPlease see CHANGELOG.md for details on recent changes.
Pull requests are welcome! Please keep the scope aligned with the package goals.
vendor/bin/pint before submitting PHP changesMIT β see LICENSE for details.
How can I help you explore Laravel packages today?