Listen callback is not working in Pusher API Laravel 5.4

前端 未结 3 2206
名媛妹妹
名媛妹妹 2021-02-19 11:20

Problem

I can confirm that Pusher API is receiving the message. I saw in Debug console of Pusher website. But listen callback is not working at all.

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-19 12:15

    1. You have to listen to: SendMessageEvent without the namespace.
    2. when you listen to a private channel, you need to to listen to private-SendmessageChannel or you use Echo.private('SendmessageChannel')

    Because we fixxed the issue via teamspeak at some parts it's difficult to explain it in this answer in full detail.

    One problem was also that the event was fired before the client started to listen to it. The best way is to debug with the pusher console and to fire custom events.

提交回复
热议问题