微信模板消息Notification

未匹配的标注

我们为您内置了微信模板消息 Notification ,您可以直接使用该 Notification ,您也可以自建 Notification 与微信模板消息频道搭配。
use Chowjiawei\Helpers\Notifications\WechatTemplateMessageNotification;

  • 不指定用户(广播用户)

Notification::route('WechatTemplateMessage', null)->notify(new WechatTemplateMessageNotification($data));

  • 指定用户
 $user=['odAYnxOVy7vS266666666','odAYnxEuuTCf66666fov276666'];
 $template="iA2V1K45vS8IgUEvE666666EH3R-V-66666";
 $data=[
 "order_id"=>[
 "value"=>"20200414234478934343",
 "color"=>"#173177"
 ],
 "package_id"=>[
 "value"=>"SF4345454534",
 "color"=>"#173177"
 ],
 "remark"=>[
 "value"=>'模板消息发送',

 "color"=>"#173177"
 ]
 ];
 Notification::route('WechatTemplateMessage', $user)->notify(new WechatTemplateMessageNotification($data, $template));

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
chowjiawei
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 0
发起讨论 只看当前版本


暂无话题~