wujunze / dingtalk-exception
Laravel exception notify through DingTalk
Installs: 27 865
Dependents: 0
Suggesters: 0
Security: 0
Stars: 94
Watchers: 3
Forks: 8
Open Issues: 0
Requires
- php: ^7.0
- wangju/ding-notice: ^1.0
Requires (Dev)
- laravel/framework: ^5.6|6.20.26
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-12-20 14:10:39 UTC
README
Laravel/Lumen exception notify through DingTalk
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);
}
}
Config
simple type
use Wujunze\DingTalkException\DingTalkExceptionHelper;
class Handler extends ExceptionHandler
{
// ...
public function report(Exception $exception)
{
DingTalkExceptionHelper::notify($exception, true);
parent::report($exception);
}
}