Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wujunze/dingtalk-exception
Laravel/Lumen exception notify through DingTalk
https://github.com/wujunze/dingtalk-exception
dingtalk-robot laravel
Last synced: 6 days ago
JSON representation
Laravel/Lumen exception notify through DingTalk
- Host: GitHub
- URL: https://github.com/wujunze/dingtalk-exception
- Owner: wujunze
- License: apache-2.0
- Created: 2018-07-26T08:33:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-20T07:58:04.000Z (almost 3 years ago)
- Last Synced: 2024-04-20T06:02:26.240Z (7 months ago)
- Topics: dingtalk-robot, laravel
- Language: PHP
- Homepage: https://github.com/wujunze/dingtalk-exception
- Size: 30.3 KB
- Stars: 93
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dingtalk-exception
Laravel/Lumen exception notify through DingTalk[![Latest Stable Version](https://poser.pugx.org/wujunze/dingtalk-exception/v/stable)](https://packagist.org/packages/wujunze/dingtalk-exception) [![Total Downloads](https://poser.pugx.org/wujunze/dingtalk-exception/downloads)](https://packagist.org/packages/wujunze/dingtalk-exception) [![License](https://poser.pugx.org/wujunze/dingtalk-exception/license)](https://packagist.org/packages/wujunze/dingtalk-exception)
## Inspire And Thanks
[cblink/bearychat-exception](https://github.com/cblink/bearychat-exception)
[wowiwj/ding-notice ](https://github.com/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](https://wujunze.com/blog-images/r/p/001/laravel-dingtalk.png)
## Config
simple type
```
use Wujunze\DingTalkException\DingTalkExceptionHelper;
class Handler extends ExceptionHandler
{
// ...
public function report(Exception $exception)
{
DingTalkExceptionHelper::notify($exception, true);
parent::report($exception);
}}
```