proclame / laravel-notify-admin
An easy helper to notify the admin or webmaster about general events using laravel notification system
Requires
- illuminate/support: ^v8.0.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.1
- nunomaduro/collision: ^5.3
- orchestra/testbench: ^6.15
- pestphp/pest: ^1.18
- pestphp/pest-plugin-laravel: ^1.1
- spatie/laravel-ray: ^1.23
- vimeo/psalm: ^4.8
Suggests
Provides
None
Conflicts
None
Replaces
None
README
An easy helper to notify the admin or webmaster about general events using Laravel's notification system.
Every so often an app can use a little monitoring, and often this is not to a Model (User) that is required int the app to exist.
This helper allows you to define main Notification “routes”, where a notification can be sent.
Installation
You can install the package via composer:
composer require proclame/laravel-notify-admin
You can (optionally) publish the config file with:
php artisan vendor:publish --provider="Proclame\LaravelNotifyAdmin\NotifyAdminServiceProvider"
This is the contents of the published config file:
You can add options for extra notification channels
return [ 'mail' => env('NOTIFY_ADMIN_MAIL'), 'telegram' => env('NOTIFY_ADMIN_TELEGRAM'), ];
Usage
notify_admin(new InvoicePaid($invoice));
Testing
@todo
composer test
License
The MIT License (MIT). Please see License File for more information.