使用钉钉通知你的 Laravel 框架系统异常

看了Hanson兄弟的倍洽通知异常 php

咱们团队主要用钉钉,就想找个Laravel的钉钉通知异常的包,最好是安装后开箱即用的。laravel

在Google和GitHub上找了有3分钟仍是没有找到能开箱即用的,因而本身动手丰衣足食git

花了20分钟"写"(chao)了一个Laravel 钉钉通知异常的包 wujunze/dingtalk-exception github

食用方法

安装

composer require wujunze/dingtalk-exception

发布配置文件

php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider

配置Handler

app/Exceptions/Handler.phpshell

use Wujunze\DingTalkException\DingTalkExceptionHelper;

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

}

记得配置你的 config/ding.phpapp

效果以下

file

GitHub仓库: https://github.com/wujunze/di...composer

Inspire And Thanks

cblink/bearychat-exception
wowiwj/ding-notice ide

Thanks

相关文章
相关标签/搜索