提交
This commit is contained in:
parent
e5e927ae6a
commit
a12096f4cb
|
@ -28,7 +28,7 @@ composer require tm-wms/message-notify
|
|||
|
||||
## 配置文件
|
||||
|
||||
发布配置文件`config/message_notify.php`
|
||||
发布配置文件`config/message_notify.php` 具体配置message_notify.php
|
||||
|
||||
```sh
|
||||
php bin/hyperf.php vendor:publish tm-wms/message-notify
|
||||
|
|
|
@ -19,7 +19,7 @@ return [
|
|||
Notify::INFO => [
|
||||
'token' => env('NOTIFY_DINGTALK_TOKEN', ''),
|
||||
'secret' => env('NOTIFY_DINGTALK_SECRET', ''),
|
||||
'keyword' => env('NOTIFY_DINGTALK_KEYWORD', ['test']),
|
||||
'keyword' => env('NOTIFY_DINGTALK_KEYWORD', ['']),
|
||||
],
|
||||
// 错误信息告警群
|
||||
Notify::ERROR => [
|
||||
|
|
|
@ -26,6 +26,9 @@ class Notify
|
|||
|
||||
public static function make(?AbstractChannel $channel = null): Connection
|
||||
{
|
||||
$default = env('NOTIFY_DEFAULT_CHANNEL');
|
||||
$channels = config('message_notify.channels');
|
||||
$channel = $channel ?? make($channels[$default]['channel'] ?? null);
|
||||
return make(Connection::class, [
|
||||
$channel
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user