wujunze / dingtalk-exception

Laravel/Lumen exception notify through DingTalk

Home Page:https://github.com/wujunze/dingtalk-exception

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dingtalk-exception

Laravel/Lumen exception notify through DingTalk

Latest Stable Version Total Downloads License

Inspire And Thanks

cblink/bearychat-exception
wowiwj/ding-notice

Install

composer require wujunze/dingtalk-exception

Add the service provider to the providers array in config/app.php:

DingNotice\DingNoticeServiceProvider::class,

publish the config file:

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

Usage

fix file app/Exceptions/Handler.php


use Wujunze\DingTalkException\DingTalkExceptionHelper;

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

}

file

Config

simple type


use Wujunze\DingTalkException\DingTalkExceptionHelper;

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

}

About

Laravel/Lumen exception notify through DingTalk

https://github.com/wujunze/dingtalk-exception

License:Apache License 2.0


Languages

Language:PHP 100.0%