Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Notifier Laravel Package

symfony/notifier

Symfony Notifier sends notifications through multiple channels like email, SMS, chat apps, and push. It unifies transports and routing so you can dispatch messages to users via one or more providers with a consistent API.

View on GitHub
Deep Wiki
Context7

Sends notifications via one or more channels (email, SMS, ...)

Frequently asked questions about Notifier
Can I use Symfony Notifier in Laravel without installing the full Symfony framework?
Yes. Notifier is framework-agnostic and works in Laravel via Composer dependencies like `symfony/notifier`, `symfony/http-client`, and `symfony/mailer`. Avoid Symfony’s full stack by using Laravel’s service container bindings or the Symfony Bridge packages.
How do I send an SMS notification via Twilio in Laravel using Symfony Notifier?
First, install the Twilio transport: `composer require symfony/notifier-twilio`. Then bind it in Laravel’s `AppServiceProvider` using `app()->bind(TransportInterface::class, function () { return new TwilioTransport('ACCOUNT_SID', 'AUTH_TOKEN'); })`. Finally, send with `$notifier->send(new Notification($recipient, 'Your message'))`.
Does Symfony Notifier support Laravel’s queue system for async notifications?
Absolutely. Notifier integrates with Laravel queues by default. Use `$notifier->send(new EmailNotification())->delay(60)` to defer delivery. Process jobs with `php artisan queue:work` or Horizon for monitoring.
What Laravel versions are compatible with Symfony Notifier v8.x?
Notifier v8.x works with Laravel 8.x–11.x. Ensure your `composer.json` requires `symfony/notifier:^8.0` and compatible Symfony components (e.g., `symfony/http-client:^6.4`). Test with Laravel’s latest LTS for stability.
How do I handle failed notifications in Laravel with Symfony Notifier?
Notifier emits `NotificationFailed` events. Listen to them in Laravel via `Event::listen(NotificationFailed::class, function ($event) { Log::error($event->getException()); })`. Pair with Laravel’s Horizon or Sentry for alerts.
Can I use Blade templates for notifications with Symfony Notifier?
Yes. Notifier supports dynamic content via its `Notification` class. Pass Blade-rendered strings or use a custom `Notification` subclass to merge data with views before sending.
What are the best alternatives to Symfony Notifier for Laravel?
For Laravel, consider `laravel-notification-channels` (community-driven, channel-specific) or `spatie/laravel-activitylog` (for event-based notifications). Notifier stands out for its unified API and Symfony’s battle-tested transports.
How do I mock Symfony Notifier transports for unit testing in Laravel?
Use Notifier’s `MockTransport` to capture sent notifications. Bind it in tests: `app()->bind(TransportInterface::class, MockTransport::class)`. Verify calls with `$mockTransport->getNotifications()`.
Will Symfony Notifier work with Laravel’s Echo/Pusher for real-time updates?
Notifier itself is stateless, but you can pair it with Laravel Echo/Pusher. Trigger real-time events via `NotificationSent` listeners, then broadcast updates to clients using Echo’s channels.
How do I configure fallback transports (e.g., SMS → Email) in Laravel?
Notifier supports priority routing. Bind multiple transports and use `MultiTransport` to define fallbacks: `new MultiTransport([$smsTransport, $emailTransport])`. Configure retry logic via `RetryStrategy` for failed attempts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope