LaravelPackages.net
Acme Inc.
Toggle sidebar
unoapp-dev/laravel-pubnub

Pubnub event broadcast driver for Laravel/Lumen

6.721
3
1.0.1
About unoapp-dev/laravel-pubnub

unoapp-dev/laravel-pubnub is a Laravel package for pubnub event broadcast driver for laravel/lumen. It currently has 3 GitHub stars and 6.721 downloads on Packagist (latest version 1.0.1). Install it with composer require unoapp-dev/laravel-pubnub. Discover more Laravel packages by unoapp-dev or browse all Laravel packages to compare alternatives.

Last updated

Pubnub Driver for Laravel & Lumen

Integrates the Pubnub PHP library with Laravel and Lumen

Installation

composer require unoapp-dev/laravel-pubnub

Laravel 5

Add a ServiceProvider to your providers array in config/app.php:

'providers' => [
    'Unoappdev\PubnubDriver\PubnubServiceProvider',
]

Lumen

For Lumen add the following in your bootstrap/app.php

$app->register(Unoappdev\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.

Comments