| Package Data | |
|---|---|
| Maintainer Username: | unoapp-dev |
| Maintainer Contact: | anilahir@unoindia.co (Anil Ahir) |
| Package Create Date: | 2018-10-12 |
| Package Last Update: | 2019-04-16 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-19 15:10:33 |
| Package Statistics | |
|---|---|
| Total Downloads: | 6,721 |
| Monthly Downloads: | 2 |
| Daily Downloads: | 0 |
| Total Stars: | 3 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Integrates the Pubnub PHP library with Laravel and Lumen
composer require unoapp-dev/laravel-pubnub
Add a ServiceProvider to your providers array in config/app.php:
'providers' => [
'Unoappdev\PubnubDriver\PubnubServiceProvider',
]
For Lumen add the following in your bootstrap/app.php
$app->register(Unoappdev\PubnubDriver\PubnubServiceProvider::class);
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.