How do I receive data when the client initially joins a channel?
Something like this:
Echo.channel('channel-name') .onjoin(function (data) { console.log(data) // Data received from server }) As soon when the client joins, the server should respond with data, preferably with PHP.
pusher:subscription_succeededbinding so it occurs when the subscription is etablished