0

I am utilizing a NextJS front-end and a Laravel back-end, with Soketi managing the WebSocket server. From my front end, using Laravel Echo, I can listen to connection events from the WebSocket server.

window.socket = socket.join(`game.${response.game.id}`)
  .here((users) => {})
  .joining((user) => {})
  .leaving((user) => {});

I want to receive the same event but in the Laravel server because if a user logs off, I want the server to know about it and broadcast the information to all users. I checked the Soketi documentation looking for a webhook but didn't find what it was looking for. Maybe it just can't be done.

0