PHP code example of sumiansz / laravel-dingtalk-error-notifier

1. Go to this page and download the library: Download sumiansz/laravel-dingtalk-error-notifier 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/ */

    

sumiansz / laravel-dingtalk-error-notifier example snippets


return [
    ...

    'error-notifier' => [
        'enabled' => env('DING_ERROR_NOTIFIER_ENABLED', true),

        'token' => env('DING_ERROR_NOTIFIER_DING_TOKEN', ''),

        'timeout' => env('DING_ERROR_NOTIFIER_DING_TIME_OUT', 2.0)
    ],
];



return [
    /*
    |--------------------------------------------------------------------------
    | notifier name
    |--------------------------------------------------------------------------
    */
    'name' => env('NOTIFIER_NAME', 'ding'),

    /*
    |--------------------------------------------------------------------------
    | error notify level
    |--------------------------------------------------------------------------
    */
    'level' => env('NOTIFIER_LEVEL', 'error'),

    /*
    |--------------------------------------------------------------------------
    | ding channel, you can config in ding.php
    |--------------------------------------------------------------------------
    */
    'ding_channel' => env('NOTIFIER_DING_CHANNEL', 'error-notifier'),
];
bash
php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider"
bash
php artisan vendor:publish --provider="Sumian\DingtalkErrorNotifier\DingtalkErrorNotifierServiceProvider"