I'm trying to understand how to catch an event backend side once a user joined the channel. I mean right after the authentication has been done for a Private or a Presence channel.
For instance, after that:
Broadcast::channel('chat.{roomId}', function ($user, $roomId) {
if ($user->canJoinRoom($roomId)) {
return ['id' => $user->id, 'name' => $user->name];
}
});
successfully proceeds, I would expect to have the possibility to catch an event to know that the user joined the channel (not only frontend side).
Any hint on how to handle it?
Reference: https://laravel.com/docs/6.x/broadcasting#joining-presence-channels