使用釘釘通知你的 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

相關文章
相關標籤/搜索