ervinsvilumsons / laravel-alert
Laravel Alert is a package that provides an easy way to notify failed service alerts in Laravel applications.
v1.0.0
2026-09-07 15:55 UTC
Requires
- php: ^8.3
Requires (Dev)
- laravel/pint: ^1.30
- laravel/slack-notification-channel: ^3.10
- orchestra/testbench: ^11.2
- pestphp/pest: ^5
- phpstan/phpstan: ^2.2
- rector/rector: ^2.6
Suggests
- laravel/slack-notification-channel: Required to send Slack notifications
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-07 16:25:34 UTC
README
Laravel Alert provides a small, configurable way to notify a group of recipients.
📦 Installation
composer require ervinsvilumsons/laravel-alert
Publish the configuration:
php artisan vendor:publish --tag=alert-manager-config
This creates config/alert-manager.php.
🚀 Quick Start
use AlertManager; AlertManager::send( title: 'Payment service unavailable', message: 'The payment provider did not respond.', context: [ 'order_id' => $order->id, 'provider' => 'acme-payments', ], level: 'critical', );
Configuration
The default configuration is:
return [ 'enabled' => env('ALERTS_ENABLED', true), 'queue' => env('ALERTS_QUEUE', 'default'), 'channels' => [ 'mail', // 'slack', ], 'notifiables' => [], 'notification' => AlertNotification::class, ];
Custom notification
To add or replace notification channels, create a notification class with the same constructor data shape and configure it in config/alert-manager.php:
'notification' => App\Notifications\CustomAlertNotification::class,
⚖️ License
Laravel Alert Manager is released under the MIT License.