gpt4 book ai didi

laravel - 使用 Laravel FCM 向设备和 Web 浏览器发送推送通知

转载 作者:行者123 更新时间:2023-12-02 14:24:13 25 4
gpt4 key购买 nike

我正在使用以下包向浏览器发送通知。

https://github.com/kawankoding/laravel-fcm

发送通知的代码,

fcm()
->to($recipients) // $recipients must an array
->notification([
'title' => 'Test FCM',
'body' => 'This is a test of FCM',
])
->send();

这对于浏览器来说运行良好。

问题:$recipients 数组可以包含两种类型,即设备 token (Android 和 iOS)和浏览器 token (FF 和 Chrome)吗?

最佳答案

没有。您只能向 iOS/Android 设备发送通知/数据。

关于laravel - 使用 Laravel FCM 向设备和 Web 浏览器发送推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48251822/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com