wss0823 / mbs-push-middleware
Uniondrug mbs push middleware Component for uniondrug/framework
dev-master
2022-01-25 07:42 UTC
Requires
- uniondrug/framework: ^2.0
- uniondrug/middleware: ^2.0
- uniondrug/phar: ^2.0
- uniondrug/service-sdk: ^3.0
This package is auto-updated.
Last update: 2024-10-25 14:16:28 UTC
README
安装
composer require wss0823/module-push-middleware
中间件依赖
uniondrug/middleware
中间件基础组件。
修改 app.php
配置文件,加上Middleware服务,服务名称LogMiddleware
return [ 'default' => [ ...... 'providers' => [ ...... \Uniondrug\TokenAuthMiddleware\MbsPushMiddleware::class, ], ], ];
修改 server.php
配置文件,加入 tables 内存表。
return [ 'default' => [ "tables" => [ Uniondrug\MbsPushMiddleware\MbsPushTable::class => 64 ], "class" => \App\Servers\Http::class, ] ]
在对应需要加入mbs发送的地方写入数据
$table= $this->getTable(MbsPushTable::TABLE_NAME); $table->set($this->>getTrace()->getRequestId(),["topicName"=>"merchant","topicTag"=>"edit","message"=>$value]);