Skip to main content

Introduction

Besides flash notifications that appear on-screen, Filament supports sending notifications to the database for persistent storage and broadcasting notifications via websockets for real-time delivery.

Database notifications

Database notifications are stored in your database and displayed in a persistent notification modal within Filament panels.
Laravel sends database notifications using the queue. Ensure your queue worker is running to receive notifications.

Using with Laravel notification classes

Integrate with traditional Laravel notification classes:

Receiving database notifications

Polling for updates

By default, Filament polls for new notifications every 30 seconds:
Customize the polling interval:
Disable polling entirely:

Using websockets for real-time updates

For instant notification delivery, use websockets instead of polling. First, configure Echo in your panel. Then enable event dispatching when sending notifications:
This triggers the DatabaseNotificationsSent event, immediately updating the notification panel.

Marking notifications as read

From notification actions

Add actions that mark individual notifications as read:
Or mark as unread:

Mark all as read

Users can mark all notifications as read using the button at the top of the notifications modal.

Notification panel positioning

By default, the notification trigger appears in the topbar. Move it to the sidebar:

Opening the notifications modal

Trigger the notifications modal programmatically by dispatching a browser event:

Broadcast notifications

Broadcast notifications are sent via websockets for real-time delivery without database persistence.

Sending broadcast notifications

Use the broadcast() method:
Broadcast to multiple users:

Notification types comparison

Customizing notification behavior

Notification status

Database notifications automatically inherit status from the notification:

Notification duration

Database notifications are always persistent and require manual dismissal. Flash notifications default to 6 seconds:

Notification with actions

Actions work identically across all notification types:

Advanced techniques

Sending multiple notification types

Send the same notification via multiple channels:

Conditional notification delivery

Send different notifications based on user preferences:

Notification identifiers

Use consistent identifiers for managing notifications: