I am working on a realtime chatting application and I am using websocket with laravel
I am using library beyoundcode/laravel-websocket
I have change broadcast driver to pusher and have configured broadcaster.php to this
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => '127.0.0.1',
'port' => env('PUSHER_PORT', 6001),
'scheme' => env('PUSHER_SCHEME', 'http'),
'encrypted' => true,
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
When I run an event using
event(new AppEventsUserStatusEvent())
Instead of sending message to localhost which is 127.0.0.1 stated in pusher option it sends to pusher.com
I clear clear my cache and config not changes
class UserStatusEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public function __construct()
{
//
}
public function broadcastOn()
{
return new PresenceChannel('status-update');
}
}