jourdon/ding-exception

Notify Laravel exceptions via DingTalk

Downloads

10

Stars

1

Version

v1.0.1

通过钉钉推送机器人消息推送Laravel异常

Latest Stable Version Total Downloads License ##要求

  • PHP版本: 7.1+
  • laravel版本:5.5+

安装

composer require jourdon/ding-exception

发布配置文件:

php artisan vendor:publish --provider="Jourdon\DingException\DingExceptionServiceProvider"

钉钉启用开关 默认为开启

DING_ENABLED=true

钉钉的推送token

(必选)发送钉钉机器人的token, 钉钉推送链接:https://oapi.dingtalk.com/robot/send?access_token=your-token

DING_TOKEN=your-token

是否显示Trace 默认为关闭

DING_TRACE=false

使用方法

use Jourdon\DingException\DingException;

class Handler extends ExceptionHandler
{
//...
    public function report(Exception $exception)
    {
        DingException::notify($exception);
        parent::report($exception);
    }
//...
}


示例

file

jourdon

Author

jourdon