Skip to content

Integrates the Pubnub PHP library with Laravel and Lumen

License

Notifications You must be signed in to change notification settings

unoapp-dev/laravel-pubnub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Integrates the Pubnub PHP library with Laravel and Lumen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages