Skip to content

Commit

Permalink
docs(readme): update PHP and Laravel requirements
Browse files Browse the repository at this point in the history
- Updated PHP requirement to >= 7.4
- Updated Laravel requirement to >= 7.0
  • Loading branch information
guanguans committed Aug 6, 2023
1 parent be5c01b commit a1c6393
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

## Requirement

* PHP >= 7.2
* laravel >= 5.5
* PHP >= 7.4
* laravel >= 7.0

## Installation

Expand Down Expand Up @@ -90,10 +90,9 @@ EXCEPTION_NOTIFY_DINGTALK_SECRET=SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82
```php
public function report(Exception $e)
{
// 默认通道
\ExceptionNotifier::reportIf($this->shouldReport($e), $e);
// 指定通道
\ExceptionNotifier::onChannel('dingTalk', 'mail')->reportIf($this->shouldReport($e), $e);
\ExceptionNotifier::reportIf($this->shouldReport($e), $e); // 默认通道
\ExceptionNotifier::reportIf($this->shouldReport($e), $e, 'dingTalk'); // 指定通道
\ExceptionNotifier::reportIf($this->shouldReport($e), $e, ['dingTalk', 'mail']); // 指定多个通道

parent::report($e);
}
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

## 环境要求

* PHP >= 7.2
* laravel >= 5.5
* PHP >= 7.4
* laravel >= 7.0

## 安装

Expand Down Expand Up @@ -92,10 +92,9 @@ EXCEPTION_NOTIFY_DINGTALK_SECRET=SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82
```php
public function report(Exception $e)
{
// 默认通道
\ExceptionNotifier::reportIf($this->shouldReport($e), $e);
// 指定通道
\ExceptionNotifier::onChannel('dingTalk', 'mail')->reportIf($this->shouldReport($e), $e);
\ExceptionNotifier::reportIf($this->shouldReport($e), $e); // 默认通道
\ExceptionNotifier::reportIf($this->shouldReport($e), $e, 'dingTalk'); // 指定通道
\ExceptionNotifier::reportIf($this->shouldReport($e), $e, ['dingTalk', 'mail']); // 指定多个通道

parent::report($e);
}
Expand Down

0 comments on commit a1c6393

Please sign in to comment.