DEV Community

Discussion on: Laravel Echo not listening Event from Pusher

Collapse
 
irfanullahshakir profile image
Irfan Ullah Shakir • Edited

Hy, I found solution.I just paste

import Echo from 'laravel-echo';

window.Pusher = require('pusher-js');

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    forceTLS: true
});

inside app.js and it is working fine now.Second, I changed Vue.prototype.$echo to window.Echo inside both app.js and Vue mounted Hook(where I am listening channel).