PHPackages                             cwt137/laravel-pubnub-broadcast-driver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. cwt137/laravel-pubnub-broadcast-driver

ActiveLibrary[Framework](/categories/framework)

cwt137/laravel-pubnub-broadcast-driver
======================================

PubNub broadcasting events driver for Laravel

57441PHP

Since Jun 9Pushed 10y ago1 watchersCompare

[ Source](https://github.com/cwt137/laravel-pubnub-broadcast-driver)[ Packagist](https://packagist.org/packages/cwt137/laravel-pubnub-broadcast-driver)[ RSS](/packages/cwt137-laravel-pubnub-broadcast-driver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PubNub Broadcasting Events Driver for Laravel
=============================================

[](#pubnub-broadcasting-events-driver-for-laravel)

Install Via Composer
--------------------

[](#install-via-composer)

```
composer require cwt137/laravel-pubnub-broadcast-driver
```

Setup Laravel
-------------

[](#setup-laravel)

Add the service provider `Cwt137\PubnubDriver\PubnubServiceProvider` in your `config/app.php` file. Then in the `.env` file, add the following API keys:

```
PUBNUB_PUBLISH_KEY={YOUR_PUBNUB_PUBLISH_KEY}
PUBNUB_SUBSCRIBE_KEY={YOUR_PUBNUB_SUBSCRIBE_KEY}
```

Where `{YOUR_PUBNUB_PUBLISH_KEY}` and `{YOUR_PUBNUB_SUBSCRIBE_KEY}` are your PubNub publish and subscribe keys, respectively.

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 defaut driver to `pubnub`.

Using Driver
------------

[](#using-driver)

You can use `php artisan make:event {Name}` to make a Laravel Event. Inside the event, implement the `ShouldBroadcast` interface by declaring a `broadcastOn` method. In that method you should return an array of channels you want to broadcast on.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a943858c65e3ab05a2a8f016d5b89e3e8bf52b137c934a2ebd37bdee1afade18?d=identicon)[cwt137](/maintainers/cwt137)

---

Top Contributors

[![cwt137](https://avatars.githubusercontent.com/u/174218?v=4)](https://github.com/cwt137 "cwt137 (3 commits)")

### Embed Badge

![Health badge](/badges/cwt137-laravel-pubnub-broadcast-driver/health.svg)

```
[![Health](https://phpackages.com/badges/cwt137-laravel-pubnub-broadcast-driver/health.svg)](https://phpackages.com/packages/cwt137-laravel-pubnub-broadcast-driver)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
