PHPackages                             fanout/laravel-fanout - 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. [API Development](/categories/api)
4. /
5. fanout/laravel-fanout

Abandoned → [fanout/laravel-grip](/?search=fanout%2Flaravel-grip)ArchivedLibrary[API Development](/categories/api)

fanout/laravel-fanout
=====================

Fanout.io library for Laravel.

1.2.0(7y ago)115.8k↓50%3MITPHPPHP &gt;=7.0.0

Since Jul 17Pushed 7y ago4 watchersCompare

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

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

laravel-fanout
--------------

[](#laravel-fanout)

Author: Konstantin Bokarius

Fanout.io library for Laravel.

Credit
------

[](#credit)

This project is based on the following pull request by Christopher Thomas:

Requirements
------------

[](#requirements)

- openssl
- curl
- pthreads (required for asynchronous publishing)
- php &gt;=7.0.0
- laravel &gt;= 5.5
- fanout/fanout &gt;=2.0.0 (retrieved automatically via Composer)

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

[](#installation)

Using Composer:

```
composer require fanout/laravel-fanout
```

Manual: ensure that php-fanout has been included and require the following files in laravel-fanout:

```
require 'laravel-fanout/src/fanoutbroadcaster.php';
require 'laravel-fanout/src/fanoutbroadcastserviceprovider.php';
```

Asynchronous Publishing
-----------------------

[](#asynchronous-publishing)

In order to make asynchronous publish calls pthreads must be installed. If pthreads is not installed then only synchronous publish calls can be made. To install pthreads recompile PHP with the following flag: '--enable-maintainer-zts'

Also note that since a callback passed to the publish\_async methods is going to be executed in a separate thread, that callback and the class it belongs to are subject to the rules and limitations imposed by the pthreads extension.

See more information about pthreads here:

Usage
-----

[](#usage)

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

```
'default' => 'fanout',

'connections' => [
    ...
    'fanout' => [
        'driver' => 'fanout',
        'realm_id' => '',
        'realm_key' => '',
        'ssl' => true,
        'publish_async' => false
    ],
    ...
]
```

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

```
'providers' => [
    ...
    LaravelFanout\FanoutBroadcastServiceProvider::class,
    ...
]
```

Add a custom broadcast event to your application like so:

```
namespace App\Events;

use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

class PublishToFanoutEvent implements ShouldBroadcast
{
    use SerializesModels;

    public $message;

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

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

Now to publish to Fanout.io in your application simply fire the event:

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~615 days

Total

3

Last Release

2728d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.1.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/178838?v=4)[Konstantin Wilms](/maintainers/kon)[@kon](https://github.com/kon)

![](https://avatars.githubusercontent.com/u/521953?v=4)[Justin Karneges](/maintainers/jkarneges)[@jkarneges](https://github.com/jkarneges)

---

Top Contributors

[![garethtdavies](https://avatars.githubusercontent.com/u/135382?v=4)](https://github.com/garethtdavies "garethtdavies (5 commits)")[![jkarneges](https://avatars.githubusercontent.com/u/521953?v=4)](https://github.com/jkarneges "jkarneges (4 commits)")[![seanmangar](https://avatars.githubusercontent.com/u/6080053?v=4)](https://github.com/seanmangar "seanmangar (1 commits)")[![tomhatzer](https://avatars.githubusercontent.com/u/3952168?v=4)](https://github.com/tomhatzer "tomhatzer (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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