laravelwebsocketlaravel-reverb

Laravel Reverb send data from client to server


I'm using Laravel 11 and Laravel Reverb for Websocket. It's worked correctly from Server to Client but opposite is not worked,

php artisan reverb:start --debug shows me 'Message Received' when I'm try to send from client to server, what method I can use to get data from client, I seen example which are available on internet it's created by POST method.

Is there any method to send data from client to server via websocket


Solution

  • You can create listener for event MessageReceived::class, more detail you can watch the presentation by Joe Dixon - "REAL-TIME LARAVEL" at Laracon EU https://www.youtube.com/watch?v=yrL5eCMpqtc