【发布时间】:2020-01-20 06:43:57
【问题描述】:
美好的一天! 我使用 PrecenseChannel 并通过订阅 Redis 频道在服务器端捕获加入/离开 我使用工匠命令:
public function handle()
{
$this->info("Presence channel watcher was started!");
Redis::subscribe(['PresenceChannelUpdated'] , function ($message, $channel) {
//Code for comparing users who leave and who join
Notification::send($a1->users, new ExampleNotification($a2, $data));
}
}
我使用通知发送事件(仅广播) 但在发送通知后,我在控制台中收到错误:
ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this contex
没有通知,一切正常,通知本身工作并发送广播
由于我在服务中使用这些通知,因此通知有效
有什么帮助吗?谢谢
【问题讨论】:
标签: php laravel redis laravel-echo