PHPackages                             adaojunior/laravel-postgresql-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. [HTTP &amp; Networking](/categories/http)
4. /
5. adaojunior/laravel-postgresql-broadcast-driver

ActiveLibrary[HTTP &amp; Networking](/categories/http)

adaojunior/laravel-postgresql-broadcast-driver
==============================================

Postgresql broadcasting events driver for Laravel

v1.0(10y ago)71.1k3MITPHP

Since Sep 11Pushed 10y agoCompare

[ Source](https://github.com/adaojunior/laravel-postgres-broadcast-driver)[ Packagist](https://packagist.org/packages/adaojunior/laravel-postgresql-broadcast-driver)[ Docs](https://github.com/adaojunior/laravel-postgresql-broadcast-driver)[ RSS](/packages/adaojunior-laravel-postgresql-broadcast-driver/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Postgres Broadcasting Events Driver for Laravel
===============================================

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

Installation
------------

[](#installation)

Using Composer:

```
composer require adaojunior/laravel-postgresql-broadcast-driver
```

In your config/app.php file add the following provider to your service providers array:

```
'providers' => [
    ...
    Adaojunior\PostgreSqlBroadcastDriver\BroadcastServiceProvider::class,
    ...
]
```

In your config/broadcasting.php file set the default driver to 'postgresql' and add the connection configuration like so:

```
'default' => 'postgresql',

'connections' => [
    ...
    'postgresql' => [
            'driver' => 'postgresql',
            'connection' => env('BROADCAST_PG_DB','pgsql')
        ]
    ...
]
```

Usage
-----

[](#usage)

Add a custom broadcast event to your application like so:

```
namespace App\Events;

use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

class Message extends Event implements ShouldBroadcast
{
    protected $message;

    public function __construct($message)
    {
        $this->message= $message;
    }

    public function broadcastOn()
    {
        return ['MessageChannel'];
    }

    public function broadcastWith()
    {
        return ['message' => $this->message];
    }
}
```

Now to publish in your application simply fire the event:

```
event(new App\Events\Message('Test publish!!!'));
```

NodeJS Client (optional)
------------------------

[](#nodejs-client-optional)

```
npm install pg-pubsub --save
```

```
// server.js

var PGPubsub = require('pg-pubsub');

var instance = new PGPubsub('postgres://homestead:secret@localhost/homestead';

instance.addChannel('MessageChannel', function (payload) {
    console.log(payload);
});
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3949d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelpostgresqlBroadcasting

### Embed Badge

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

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[lomkit/laravel-rest-api

A package to build quick and robust rest api for the Laravel framework.

59463.6k](/packages/lomkit-laravel-rest-api)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3891.8k](/packages/codewithdennis-larament)[justbetter/laravel-http3earlyhints

A HTTP3 Early Hints Middleware for Laravel

1977.0k4](/packages/justbetter-laravel-http3earlyhints)

PHPackages © 2026

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