Monday, May 22, 2017

Laravel Broadcast Channels - check connections

I can't find this in the docs or by searching, maybe someone has some tips. I'm trying to check how many connections are on a presence channel on the backend.

I can check fine on the front-end with Echo like so:

Echo.join('chat')
    .here((users) => {
        // users.length is the proper count of connections
    })

But is there a way I can get that same number of connections, but in the backend code somewhere within Laravel?



via Drew

Advertisement