Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

234
Vistas
How to bind "pusher:subscribe" event , using Laravel's Echo

In my laravel application i am using laravel ECHO. In this I'm trying to listen a event "pusher:subscribe" through on method. But I its not happening. I can able to subscribe, add_memeber, remove_memeber as per laravel echo documentation. But i cannot able to listen specifically "pusher:subscribe" event. Actually I am trying to get data from this event and i will manipulate further

window.Echo = new Echo({
                broadcaster: 'pusher',
                key: 'myKeyHere',
                authEndpoint: 'pusher/auth',
                auth: {
                    headers: {

                    },
                    params: {
                        username: this.username
                    }
                }
            });


 window.Echo.join('openChat').here((users) => {
                console.log(users);

            }).listen('MessagePublished', (e) => {
                console.log('Message Received');

            }).on('pusher:subscribe', (users) => {
                console.log('NOT WORKING');

            }).joining((user) => {
                console.log('User Joined');
            }).leaving((user) => {
                console.log('User gone');
            });
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

After a deep lookup in documents and forums i understood pusher:subscribe is a internal event , so it cannot be captured through Laravel ECHO. But I used pusher:subscription_succeeded to capture the member info ..

Modified Code:

window.Echo = new Echo({
            broadcaster: 'pusher',
            key: 'myKeyHere',
            authEndpoint: 'pusher/auth',
            auth: {
                headers: {

                },
                params: {
                    username: this.username
                }
            }
        });


  window.Echo.join('openChat').here((users) => {
            console.log(users);

        }).listen('MessagePublished', (e) => {
            console.log('Message Received');

        }).on('pusher:subscription_succeeded', (member) => {
            console.log(member);

        }).joining((user) => {
            console.log('User Joined');
        }).leaving((user) => {
            console.log('User gone');
        });
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda