I use laravel-echo
for working with pusherjs
in Nuxtjs.
nuxt.config.js section for pusherjs configuration:
buildModules: [
[
'@nuxtjs/laravel-echo', {
broadcaster: 'pusher',
key: 'my-key-here',
cluster: 'eu',
forceTLS: true
}
]
],
package.json
"vue": "^2.6.12",
"nuxt": "^2.14.3",
"pusher-js": "^7.0.0",
"@nuxtjs/laravel-echo": "^1.1.0",
pages/test.vue
<script>
export default {
mounted() {
this.$echo.channel('ch').listen("ev", (res) => {
console.log(res);
});
},
};
</script>
I manually send Event via Pusherjs's Debug Console
but nothing happens in chrome's console.
I'm sure the key and my app is connected to pusherjs correctly; because when I refresh the page, the logs appear in pusherjs's debug console:
So why are the events not received in front end?