Pusher Echo is not returning response in multiple blade files

Viewed 45

I'm using pusher for my chat app. I have a scenario of two different users both users have a different .blade.html file.

Pusher is working fine and returning responses with the first user's view file but not working with the second user's view file. I've initialized this code below in the resource/app.js file and also run the npm run watch

Echo.private(`chat`).listen('.message', (e)=>{ console.log(e); });

However other things are working fine with the second user's view like I try to use console.log("hello"); in resource/app.js. It was working fine but the Echo.private is not working in the second file.

Please guide me I don't know what's wrong with this.

0 Answers
Related