File tree Expand file tree Collapse file tree 2 files changed +2
-44
lines changed Expand file tree Collapse file tree 2 files changed +2
-44
lines changed Original file line number Diff line number Diff line change @@ -38,22 +38,12 @@ composer require guanguans/laravel-exception-notify -v
3838
3939## 配置
4040
41- ### 注册服务
42-
43- #### laravel
41+ ### 发布文件(可选的)
4442
4543``` bash
4644php artisan vendor:publish --provider=" Guanguans\\ LaravelExceptionNotify\\ ExceptionNotifyServiceProvider"
4745```
4846
49- #### lumen
50-
51- 将以下代码段添加到 ` bootstrap/app.php ` 文件中的 ` Register Service Providers ` 部分下:
52-
53- ``` php
54- $app->register(\Guanguans\LaravelExceptionNotify\ExceptionNotifyServiceProvider::class);
55- ```
56-
5747### 申请通道 ` token ` 、` secret ` 等信息
5848
5949* [ Bark] ( https://github.com/Finb/Bark )
@@ -79,17 +69,6 @@ EXCEPTION_NOTIFY_DINGTALK_TOKEN=c44fec1ddaa8a833156efb77b7865d62ae13775418030d94
7969EXCEPTION_NOTIFY_DINGTALK_SECRET=SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82 # 可选的
8070```
8171
82- ### laravel7 及以下版本和 lumen 中需在 ` app/Exceptions/Handler.php ` 的 ` report ` 方法中添加
83-
84- ``` php
85- public function report(Throwable $exception)
86- {
87- \Guanguans\LaravelExceptionNotify\Facades\ExceptionNotify::reportIf($this->shouldReport($exception), $exception);
88-
89- parent::report($exception);
90- }
91- ```
92-
9372## 使用
9473
9574### 测试异常通知
Original file line number Diff line number Diff line change @@ -38,22 +38,12 @@ composer require guanguans/laravel-exception-notify -v
3838
3939## Configuration
4040
41- ### Register service
42-
43- #### laravel
41+ ### Publish files(optional)
4442
4543``` bash
4644php artisan vendor:publish --provider=" Guanguans\\ LaravelExceptionNotify\\ ExceptionNotifyServiceProvider"
4745```
4846
49- #### lumen
50-
51- Add the following snippet to the ` bootstrap/app.php ` file under the ` Register Service Providers ` section as follows:
52-
53- ``` php
54- $app->register(\Guanguans\LaravelExceptionNotify\ExceptionNotifyServiceProvider::class);
55- ```
56-
5747### Apply for channel ` token ` or ` secret ` information
5848
5949* [ Bark] ( https://github.com/Finb/Bark )
@@ -79,17 +69,6 @@ EXCEPTION_NOTIFY_DINGTALK_TOKEN=c44fec1ddaa8a833156efb77b7865d62ae13775418030d94
7969EXCEPTION_NOTIFY_DINGTALK_SECRET=SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82 # optional
8070```
8171
82- ### Laravel7 and below versions and lumen need to be added to the ` report ` method of ` app/Exceptions/Handler.php `
83-
84- ``` php
85- public function report(Throwable $exception)
86- {
87- \Guanguans\LaravelExceptionNotify\Facades\ExceptionNotify::reportIf($this->shouldReport($exception), $exception);
88-
89- parent::report($exception);
90- }
91- ```
92-
9372## Usage
9473
9574### Test for exception notify
You can’t perform that action at this time.
0 commit comments