eliuflorez/laravel-pubnub 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-25