Panel Builder
Notifications
Overview
The Panel Builder uses the Notifications package to send messages to users. Please read the documentation to discover how to send notifications easily.
If you'd like to receive database notifications, you can enable them in the configuration:
use Filament\Panel; public function panel(Panel $panel): Panel{ return $panel // ... ->databaseNotifications();}
You may also control database notification polling:
use Filament\Panel; public function panel(Panel $panel): Panel{ return $panel // ... ->databaseNotifications() ->databaseNotificationsPolling('30s');}
Setting up websockets in a panel
The Panel Builder comes with a level of inbuilt support for real-time broadcast and database notifications. However there are a number of areas you will need to install and configure to wire everything up and get it working.
- If you haven't already, read up on broadcasting in the Laravel documentation.
- Install and configure broadcasting to use a server-side websockets integration like Pusher.
- If you haven't already, you will need to publish the Filament package configuration:
php artisan vendor:publish --tag=filament-config
- Edit the configuration at
config/filament.php
and uncomment thebroadcasting.echo
section - ensuring the settings are correctly configured according to your broadcasting installation. - Ensure the relevant
VITE_*
entries exist in your.env
file. - Clear relevant caches with
php artisan route:clear
andphp artisan config:clear
to ensure your new configuration takes effect.
Your panel should now be connecting to your broadcasting service. For example, if you log into the Pusher debug console you should see an incoming connection each time you load a page.
To send a real-time notification, see the broadcast notifications documentation.
Edit on GitHubStill need help? Join our Discord community or open a GitHub discussion