Looking to hire Laravel developers? Try LaraJobs

laravel-alert maintained by ervinsvilumsons

Description
Laravel Alert is a package that provides an easy way to notify failed service alerts in Laravel applications.
Last update
2026/09/16 19:05 (dev-main)
License
Downloads
5

Comments
comments powered by Disqus

Laravel Alert Manager

Latest Version on Packagist PHP 8.3+ Laravel 10+ Tests codecov License

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.