jourdon/ding-exception

Notify Laravel exceptions via DingTalk

v1.0.1 2018-07-30 03:36 UTC

This package is not auto-updated.

Last update: 2024-10-27 06:13:10 UTC


README

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