chaos-ws/laravel-chaos-broadcaster
最新稳定版本:1.0
Composer 安装命令:
composer require chaos-ws/laravel-chaos-broadcaster
包简介
Chaos Websocket broadcaster
README 文档
README
You can install using the Composer package manager:
composer require chaos-ws/laravel-chaos-broadcaster
Configuration
Add Chaos redis database configuration
Add new redis database to config/database.php:
'redis' => [ 'chaos' => [ 'host' => env('CHAOS_HOST', '127.0.0.1'), 'password' => null, 'port' => env('CHAOS_PORT', 6379), 'database' => 1, ],
Add Chaos broadcast configuration
You will need to add Chaos broadcast configuration to config/broadcasting.php file:
'chaos' => [ 'driver' => 'chaos', 'connection' => 'chaos', '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' => env('PUSHER_APP_HOST', '127.0.0.1'), 'port' => env('PUSHER_APP_PORT', '6001'), 'scheme' => 'http' ], ],
Change broadcast driver
Next, you will need to add & configure Chaos connection CHAOS_HOST and CHAOS_PORT, then change your broadcast driver to chaos in your .env file:
BROADCAST_DRIVER=chaos CHAOS_HOST=127.0.0.1 CHAOS_PORT=6379
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2023-10-06