Active Module: Notification Delivery Systems

Notification Delivery Systems

Laravel Notifications support sending multi-channel updates (Database, Mail, SMS, Slack) from unified notification classes. Trigger an update and inspect stored state records.

Database Notifications Store

Unread:
No database notification records found. Press "Trigger Multi-Channel Notification" to insert one.

Multi-Channel Architecture

Unified APIs

In Laravel, a single Notification class contains code defining how to render messages for distinct channels. By defining `via()`, you can route updates dynamically based on user preferences.

Database channel

The `database` channel writes the returned array from `toArray()` as JSON into the `notifications` table, making it easy to build in-app notifications displays.

Mail Simulation

Since this local playground uses the `log` driver, mail contents are written directly to `storage/logs/laravel.log` rather than being sent over SMTP, keeping local runs fast and self-contained.

Asynchronous dispatching

Implementing `ShouldQueue` on the notification class makes Laravel run the mail compilation and database inserts inside a queue job automatically.