happyDemon / vue-echo

Vue integration for the Laravel Echo library.
228 stars 24 forks source link

I do not know how to output in the browser console #16

Closed vxhly closed 6 years ago

vxhly commented 6 years ago

main.js image App.vue image In the network you can see the accepted message image But there is no console Send a message in https://dashboard.pusher.com image

gstvr commented 6 years ago

Hi there! This is an issue with laravel-echo, rather than with this dependency.

I experienced the same problem and managed to fix it. My event was located at App\Events\SomeEvent and my JS code was this.$echo.private('...').listen('SomeEvent'). However, I had to set the namespace when initialising Laravel Echo.

Vue.use(VueEcho, {
    ...
    namespace: 'App.Events'
})

That fixed my problem and I hope this does fix yours as well!