lidelin / ding-error-notifier
ding chat 错误通知器,用于 Laravel
v0.5.0
2020-04-20 07:36 UTC
Requires
- php: >=7.1.3
- illuminate/support: ^5.5 | ^6.0
- wangju/ding-notice: ^1.0
README
说明
此包来源于 lidelin/ding-error-notifier
要求
- PHP 7.1.3+
- Laravel 5.6+
安装
- 在您的终端/命令行中运行以下命令安装包
composer require lidelin/ding-error-notifier
- 因为我们使用了 ding-notice,所以我们应该配置 ding-notice
php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider"
- 在 app/ding.php 中添加以下配置
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) ], ];
- 发布配置文件 notifier.php
php artisan vendor:publish --provider="LDL\DingErrorNotifier\DingErrorNotifierServiceProvider"
- 修改配置文件 notifier.php
<?php 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'), ];