ailose / exception-alert
errors alert for developers;
Installs: 1 799
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.0
- wangju/ding-notice: ^1.0
README
介绍
进行监控和提醒操作
要求
- php版本:>=7.0
- laravel版本: Laravel5.5+
安装
composer require ailose/exception-alert
在laravel项目中使用
安装成功后执行
php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider"
会自动将ding.php
添加到您项目的配置文件当中
相关配置
钉钉启用开关
(可选)默认为开启
DING_ENABLED=true
钉钉的推送token
- (必选)发送钉钉机器人的token,即在您创建机器人之后的access_token
- 钉钉推送链接:https://oapi.dingtalk.com/robot/send?access_token=you-push-token
DING_TOKEN=you-push-token
Inspire And Thanks
publish the config file:
php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider"
配置
config/ding.php
'DING_SIMPLE' => env('DING_SIMPLE'),
'DING_TITLE' => env('DING_TITLE'),
'DING_WORKERS' => env('DING_WORKERS'),
.env
#dingding
DING_ENABLED=true
DING_TOKEN=your token
DING_TIME_OUT=2.0
DING_SIMPLE=simple #(or normal)
DING_WORKERS=phone numbers #(155xxx,156xxx 多个号码逗号隔开)
app/Exceptions/Handler.php 添加
public function report(Exception $exception)
{
ExceptionAlertHelper::notify($exception);
parent::report($exception);
}