eliuflorez/laravel-pubnub
最新稳定版本:1.0
Composer 安装命令:
composer require eliuflorez/laravel-pubnub
包简介
Pubnub event broadcast driver for Laravel/Lumen
README 文档
README
Integrates the Pubnub PHP library with Laravel and Lumen
Installation
composer require eliuflorez/laravel-pubnub
Laravel 9+10
Add a ServiceProvider to your providers array in config/app.php:
'providers' => [ 'PubNub\PubnubDriver\PubnubServiceProvider', ]
Lumen
For Lumen add the following in your bootstrap/app.php
$app->register(PubNub\PubnubDriver\PubnubServiceProvider::class);
Configuration
Then in the .env file, add the following API keys:
PUBNUB_PUBLISH_KEY={YOUR_PUBNUB_PUBLISH_KEY}
PUBNUB_SUBSCRIBE_KEY={YOUR_PUBNUB_SUBSCRIBE_KEY}
Next in your config/broadcasting.php file, under the connections array, add the PubNub settings:
'pubnub' => [ 'driver' => 'pubnub', 'publish_key' => env('PUBNUB_PUBLISH_KEY'), 'subscribe_key' => env('PUBNUB_SUBSCRIBE_KEY'), ],
You probably want to change the default broadcast driver to pubnub.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-25