Am having troubles with using Pusher-js in Laravel and having it show on Debug console. Pusher is connecting successfully but no event is seen on the debug console. My credentials are correct, it showed something few hours ago but hasn't responded again since then and am a little confused if there's a configuration I've not made
Broadcasting.js
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'host' => '127.0.0.1',
'port' => 6001,
'scheme' => 'http',
],
],```
Boostrap.js
window.Pusher = require('pusher-js');
Pusher.logToConsole = true;
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
wsHost: window.location.hostname,
forceTLS: false,
wsPort: 6001,
disableStats: true,
});
window.Echo.channel('chat').listen('ChatEvent',(e)=>{
console.log(e)
}) ```
Websocket.js
[
'id' => env('PUSHER_APP_ID'),
'name' => env('APP_NAME'),
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'path' => env('PUSHER_APP_PATH'),
'capacity' => null,
'enable_client_messages' => false,
'enable_statistics' => true,
'verify_peer' => false,
],
],```
Package.json | devDependencies and dependencies
"axios": "^0.19.2",
"bootstrap": "^4.0.0",
"cross-env": "^7.0.2",
"jquery": "^3.2",
"laravel-echo": "^1.9.0",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.19",
"popper.js": "^1.12",
"pusher-js": "^7.0.1",
"resolve-url-loader": "^3.1.2",
"sass": "^1.20.1",
"sass-loader": "^8.0.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"v-toaster": "^1.0.3",
"vue-chat-scroll": "^1.4.0",
"websocket": "^1.0.32"
}
} ```