PHP code example of aping / laravel-alarm

1. Go to this page and download the library: Download aping/laravel-alarm library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aping / laravel-alarm example snippets


php composer.phar 

"    "aping/laravel-alarm": "dev-master"
}

Aping\LaravelAlarm\AlarmServiceProvider::class,

php artisan vendor:publish --provider="Aping\LaravelAlarm\AlarmServiceProvider"

php artisan queue:work --queue=laravel-alarm

'events' => [
    //system log(日志事件)
    Illuminate\Log\Events\MessageLogged::class => [
        Aping\LaravelAlarm\Alarms\Handlers\DingTalk\MessageLoggedAlarm::class,
    ],
    //custom event(自定义事件)
    event::class => [
        //alarm,must be implemented "Aping\LaravelAlarm\Alarms\Alarm"
        //报警器,必须实现接口Aping\LaravelAlarm\Alarms\Alarm
        Alarms::class,
    ],
],