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).
app.js
Vue.prototype.$echo
window.Echo
Vue mounted Hook
We're a place where coders share, stay up-to-date and grow their careers.
Hy, I found solution.I just paste
inside
app.jsand it is working fine now.Second, I changedVue.prototype.$echotowindow.Echoinside bothapp.jsandVue mounted Hook(where I am listening channel).