Laravel notifications are easy to start and easy to get wrong at scale. This tutorial focuses on the production details: channel choice, queue behavior, and delivery testing.
What you will build
- a queued Laravel notification class
- a mail channel implementation with custom subject/from metadata
- an optional SMS channel strategy
- a repeatable test that verifies the notification actually arrives
Channel selection matrix
| Channel | Best for | Common failure mode | Guardrail |
|---|---|---|---|
| account verification, receipts, workflow alerts | queue delay or provider throttling | queue monitoring + deterministic inbox tests | |
| SMS | OTP and urgent short-form events | provider limits and regional restrictions | retry policy + fallback channel |
| Slack | internal incident/event broadcast | webhook misconfiguration | signed webhook checks + alert routing tests |
| Database/UI | in-app notifications | stale read state in clients | read-state assertions and pagination tests |
Step 1: Create a notification class
Example notification with queueing:
Step 2: Dispatch through the queue
Use queue workers for notification delivery so web requests stay fast.
In code:
Step 3: Test notification delivery with real inboxes
Unit tests verify class behavior, but integration tests should prove real delivery. MailSlurp can create isolated inboxes for each test run and wait for expected messages.
Use this pattern for password reset, email verification, billing receipts, and admin workflow notifications.
How to inspect queued notifications
Use these checks during incident triage:
- queue depth and worker health
- failed jobs table
- provider response codes (throttle, reject, timeout)
- per-notification send latency
If notifications are delayed, fix queue pressure before changing templates or content.
Laravel notification hardening checklist
- implement
for non-trivial notifications - set explicit retry and backoff settings
- include idempotency strategy for repeatable triggers
- test delivery end to end in CI, not only in local mail preview
- track send failure rate and median delivery latency



