hasanyagout / filament-announcements
Global announcement system for different users
Package info
github.com/HasanYagout/filament-announcement
pkg:composer/hasanyagout/filament-announcements
Fund package maintenance!
Requires
- php: ^8.2
- filament/filament: ^5.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^9.0|^10.0|^11.0
This package is auto-updated.
Last update: 2026-05-25 08:19:05 UTC
README
<a href="https://packagist.org/packages/hasanyagout/announcement">
<img src="https://img.shields.io/packagist/dt/hasanyagout/announcement?style=flat-square" alt="Total Downloads" />
</a>
<a href="https://packagist.org/packages/hasanyagout/announcement">
<img src="https://img.shields.io/packagist/php-v/hasanyagout/announcement?style=flat-square" alt="PHP Version" />
</a>
<a href="https://github.com/HasanYagout/announcement/blob/main/LICENSE.md">
<img src="https://img.shields.io/github/license/HasanYagout/announcement?style=flat-square" alt="License" />
</a>
A powerful Filament plugin for broadcasting announcements to all users or specific recipients with support for scheduling, dismissible alerts, live updates, and custom recipient models.
Features
- ✅ Global announcements
- ✅ Targeted recipients
- ✅ Dismissible announcements
- ✅ Live polling updates
- ✅ Scheduled announcements
- ✅ Multiple announcement types
- ✅ Translation ready
- ✅ Filament native UI
- ✅ Custom recipient models
- ✅ User-specific visibility
- ✅ Laravel policy support
Installation
Install the package via Composer:
composer require hasanyagout/announcement
Important
If you are using Filament Panels and have not set up a custom theme yet, follow the official Filament documentation first:
https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme
After setting up a custom theme, add the plugin views to your theme CSS file:
@source '../../../../vendor/hasanyagout/announcement/resources/**/*.blade.php';
Publish and run migrations:
php artisan vendor:publish --tag="announcement-migrations"
php artisan migrate
Publish the config file:
php artisan vendor:publish --tag="announcement-config"
Optionally publish translations:
php artisan vendor:publish --tag="announcement-translations"
Optionally publish views:
php artisan vendor:publish --tag="announcement-views"
Setup
Register the plugin inside your Filament panel provider:
use HasanYagout\Announcement\AnnouncementPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ AnnouncementPlugin::make(), ]); }
Configuration
Example configuration:
use App\Models\User; return [ 'recipient_models' => [ User::class => [ 'label' => 'Users', 'title_attribute' => 'name', ], ], ];
Polling Interval
Customize the polling interval:
AnnouncementPlugin::make() ->pollingInterval('10s')
Custom Recipient Models
You can register custom recipient models dynamically:
AnnouncementPlugin::make() ->withCustomRecipients([ App\Models\User::class => [ 'label' => 'Users', 'title_attribute' => 'name', ], ])
Announcement Types
Supported announcement types:
infowarningdangersuccess
Translation Support
The plugin is fully translation-ready.
Example:
__('announcement::filament.form.title.label')
Scheduling
Announcements support scheduling using:
starts_atends_at
Only active announcements are displayed automatically.
Dismissible Announcements
Users can dismiss announcements individually.
Dismiss states are stored per recipient.
Recipient Targeting
Announcements can be:
- Global (
is_global) - Assigned to specific users/models
Supported via polymorphic recipient relationships.
Permissions & Policies
The plugin supports Laravel Policies.
Example policy registration:
protected $policies = [ \HasanYagout\Announcement\Models\Announcement::class => \HasanYagout\Announcement\Policies\AnnouncementPolicy::class, ];
Screenshots
Add screenshots here later.
Example:

Testing
composer test
Changelog
Please see CHANGELOG for more information about recent changes.
Contributing
Contributions, issues, and feature requests are welcome.
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.