Hello,
I am building a Looking For Group app that has a "rooms" system for each game utilising Laravel Reverb, a user can create a room and set how many slots the room has.
I was wondering if there is any way to check how many users are in a presence channel with Reverb to deny them access to the room if it's full, or if there is a way for me to listen to some server-side disconnect event on that room's channel because that way I could store a new room member in a database in the channels.php callback function and remove them when the event fires.
Broadcast::channel("room.{gamePath}.{roomId}", function(User $user) {
// TODO: check for room space
return [
'provider_id' => $user->provider_id,
'username' => $user->username,
'avatar' => $user->avatar,
'is_verified_creator' => $user->is_verified_creator
];
});

