PHPackages                             socketbus/socketbus-laravel - 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. socketbus/socketbus-laravel

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

socketbus/socketbus-laravel
===========================

v1.0.1(5y ago)025PHPPHP &gt;=5.3.0

Since Dec 18Pushed 5y agoCompare

[ Source](https://github.com/SocketBus/socketbus-laravel)[ Packagist](https://packagist.org/packages/socketbus/socketbus-laravel)[ RSS](/packages/socketbus-socketbus-laravel/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

SocketBus Laravel Library
=========================

[](#socketbus-laravel-library)

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

[](#installation)

```
composer require socketbus/socketbus-laravel
```

Configuration
-------------

[](#configuration)

Add the SocketBus driver in your `config/broadcasting.php`.

```
return [
    'connections' => [
        /** ... */
        'socketbus' => [
            'driver' => 'socketbus',
            'app_id' => env('SOCKET_BUS_APP_ID'),
            'secret' => env('SOCKET_BUS_SECRET'),
            'custom_encryption_key' => env('SOCKET_BUS_ENCRYPTION_KEY')
        ]
    ]
];
```

In your .env file change `BROADCAST_DRIVER` to `socketbus`.

Define in your .env `SOCKET_BUS_APP_ID`, `SOCKET_BUS_SECRET`. If the setting End-to-end Encryption is enabled, add the `SOCKET_BUS_ENCRYPTION_KEY` with a random unique string. This key is used to encrypt and decrypt the payloads.

Broadcasting
------------

[](#broadcasting)

Define your event

```
namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

class MyEventEvent implements ShouldBroadcast
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    /**
     * Create a new event instance.
     *
     * @return void
     */
    public function __construct()
    {

    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel("my-event");
    }
}
```

Send the event in real-time

```
use App\Events\MyEventEvent;

// sends a realtime message to browser
broadcast(new MyEventEvent());
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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.

###  Release Activity

Cadence

Every ~19 days

Total

2

Last Release

2003d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1234758?v=4)[valterlorran](/maintainers/valterlorran)[@valterlorran](https://github.com/valterlorran)

---

Top Contributors

[![valterlorran](https://avatars.githubusercontent.com/u/1234758?v=4)](https://github.com/valterlorran "valterlorran (14 commits)")

### Embed Badge

![Health badge](/badges/socketbus-socketbus-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/socketbus-socketbus-laravel/health.svg)](https://phpackages.com/packages/socketbus-socketbus-laravel)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M91](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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