Pusher and Laravel Updates
Getting error “Did you forget to specify the cluster when creating the Pusher instance”
Then need to set config/broadcasting.php
:
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],
to
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
"cluster" => 'us2',
"encrypted" => true
],
],
And if still calling pusher manually in your js update to be:
$window.client = new Pusher($window.pusher_key, {
cluster: 'us2',
encrypted: true
});
var pusher = $pusher($window.client);
the above depends on how are you putting the pusher info into $window but make sure to add the cluster and encryption
NOTE yours may not be us2
comments powered by Disqus