Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!