beyondcode / laravel-websockets

Websockets for Laravel. Done right.
https://beyondco.de/docs/laravel-websockets
MIT License
5.08k stars 628 forks source link

How can we listen client events on laravel #139

Closed anshul321 closed 5 years ago

anshul321 commented 5 years ago

I am using JavaScript WebSocket and sending an event to the socket server of Laravel. I am not getting how can I listen to that event on Laravel?

And it through the error when the client sends a message to the socket server.

Sending the message to socket server by javascript: var socket = new WebSocket('ws://site-url:6001/app/pusher-app-key'); socket.send('hello');

Error on socket server: http://prntscr.com/n2gnvb

stefandanaita commented 5 years ago

Have a look at my replies in #21 and #80

stephane303 commented 5 years ago

Can someone provide a full working example ? Thank you.

nausixkiz commented 2 years ago

Can someone provide a full working example ? Thank you.

Hi @stefandanaita , Do you have full working example for JavaScript WebSocket ?? I faced same issue