proclame/laravel-notify-admin

An easy helper to notify the admin or webmaster about general events using laravel notification system

v0.1.0 2021-10-05 07:21 UTC

This package is auto-updated.

Last update: 2024-11-05 14:57:57 UTC


README

Latest Version on Packagist Total Downloads

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.