I'm working on a small chat project, but it seems like Laravel echo is not listening, since I can see the log (message) correctly on pusher website dashboard
this is my code :
mounted: function(){
Echo.private('chat').listen('MessageSent', (e) => {
console.log(e)
});
},
This is my bootstrap.js file
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
});
my channel.php
Broadcast::channel('chat', function ($user) {
return auth()->check();
});
By the way I see the messages on pusher dashboard, but my vue application is not listening
I'm getting in the console:
No callbacks on private-chat