Опция pusher laravel Broadcast.php не работает ⇐ Php
Опция pusher laravel Broadcast.php не работает
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/re ... tions.html ], ], When I run an event using
event(new App\Events\UserStatusEvent()) 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'); } }
Источник: https://stackoverflow.com/questions/781 ... ot-working
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/re ... tions.html ], ], When I run an event using
event(new App\Events\UserStatusEvent()) 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'); } }
Источник: https://stackoverflow.com/questions/781 ... ot-working
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Уведомление Laravel Broadcast – ошибка «array_key_exists()» при попытке отправить уведомление
Anonymous » » в форуме Php - 0 Ответы
- 18 Просмотры
-
Последнее сообщение Anonymous
-