File tree Expand file tree Collapse file tree 2 files changed +27
-9
lines changed Expand file tree Collapse file tree 2 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 3030
3131## 安装
3232
33- ``` bash
33+ ``` bash
3434$ composer require guanguans/laravel-exception-notify -vvv
3535```
3636
3737## 配置
3838
3939### 发布服务
4040
41- ``` bash
41+ ``` bash
4242$ php artisan vendor:publish --provider=" Guanguans\\ LaravelExceptionNotify\\ ExceptionNotifyServiceProvider"
4343```
4444
@@ -54,11 +54,20 @@ $ php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\Exce
5454
5555` config/exception-notify.php `
5656
57+ ` .env ` 文件中配置
58+
59+ ``` dotenv
60+ EXCEPTION_NOTIFY_DEFAULT_CHANNEL=dingTalk
61+ EXCEPTION_NOTIFY_CHANNEL_KEYWORD=keyword
62+ EXCEPTION_NOTIFY_CHANNEL_TOKEN=fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73eeb
63+ EXCEPTION_NOTIFY_CHANNEL_SECRET=c32bb7345c0f73da2b9786f0f7dd5083bd768a29b82e6d460149d730eee51730
64+ ```
65+
5766## 使用
5867
59- ### 修改 ` app/Exceptions/Handler.php ` 文件中的 ` report ` 方法
68+ ### ` app/Exceptions/Handler.php ` 的 ` report ` 方法中添加
6069
61- ``` php
70+ ``` php
6271public function report(Exception $exception)
6372{
6473 // 添加的代码
@@ -84,7 +93,7 @@ public function report(Exception $exception)
8493
8594## 测试
8695
87- ``` bash
96+ ``` bash
8897$ composer test
8998```
9099
Original file line number Diff line number Diff line change 2828
2929## Installation
3030
31- ``` bash
31+ ``` bash
3232$ composer require guanguans/laravel-exception-notify -vvv
3333```
3434
3535## Configuration
3636
3737### Publish service
3838
39- ``` bash
39+ ``` bash
4040$ php artisan vendor:publish --provider=" Guanguans\\ LaravelExceptionNotify\\ ExceptionNotifyServiceProvider"
4141```
4242
@@ -52,11 +52,20 @@ $ php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\Exce
5252
5353` config/exception-notify.php `
5454
55+ Configure in the ` .env ` file
56+
57+ ``` dotenv
58+ EXCEPTION_NOTIFY_DEFAULT_CHANNEL=dingTalk
59+ EXCEPTION_NOTIFY_CHANNEL_KEYWORD=keyword
60+ EXCEPTION_NOTIFY_CHANNEL_TOKEN=fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73eeb
61+ EXCEPTION_NOTIFY_CHANNEL_SECRET=c32bb7345c0f73da2b9786f0f7dd5083bd768a29b82e6d460149d730eee51730
62+ ```
63+
5564## Usage
5665
5766### Modify the ` report ` method in the ` app/Exceptions/Handler.php ` file
5867
59- ``` php
68+ ``` php
6069public function report(Exception $exception)
6170{
6271 // Added code
@@ -82,7 +91,7 @@ public function report(Exception $exception)
8291
8392## Testing
8493
85- ``` bash
94+ ``` bash
8695$ composer test
8796```
8897
You can’t perform that action at this time.
0 commit comments