To display a counter of users connected on each channels i tried :
this.rooms.forEach((el) => {
Echo.join('room.' + el.id)
.here((users) => {
el.users_count = users.length;
})
.joining((user) => {
el.users_count++;
})
.leaving((user) => {
el.users_count--;
});
});
But since the current user is joining the channel, he's added in the counter, and appears in the room as connected.
Is there a way to access to the channel statistics whithout joining the channel?
I'm using laravel-websockets package and laravel echo.