PHPackages                             milespong/dynamic-horizon - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. milespong/dynamic-horizon

ActiveLibrary[Queues &amp; Workers](/categories/queues)

milespong/dynamic-horizon
=========================

A dynamic queue implementation based on Laravel Horizon

v1.0.0(6y ago)352[1 issues](https://github.com/MilesPong/dynamic-horizon/issues)MITPHPPHP &gt;=7.1.0

Since Feb 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/MilesPong/dynamic-horizon)[ Packagist](https://packagist.org/packages/milespong/dynamic-horizon)[ RSS](/packages/milespong-dynamic-horizon/feed)WikiDiscussions master Synced today

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

Dynamic Horizon
===============

[](#dynamic-horizon)

This package can help to extend [Laravel Horizon](https://laravel.com/docs/5.8/horizon) supervisors dynamically.

Feature
-------

[](#feature)

**Laravel Horizon**, which creating supervisors from the very beginning configurations, with a high constraint in `horizon.php`

**Dynamic Horizon**, which is based on Laravel Horizon, can create the supervisors dynamically despite the initial config file. This can be very helpful in a SaaS system

Install
-------

[](#install)

Require this package with composer using the following command:

```
composer require milespong/dynamic-horizon
```

After updating composer, add the service provider to the providers array in `config/app.php`

```
MilesPong\Horizon\DynamicHorizonServiceProvider::class
```

Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Usage
-----

[](#usage)

Publish the config file `dynamic-horizon.php`

```
php artisan vendor:publish --provider="MilesPong\Horizon\DynamicHorizonServiceProvider" --tag=config
```

Set a value `HORIZON_MASTER_ID` in `.env` to indicate a identifier for current horizon master supervisor

### Initialize Supervisors

[](#initialize-supervisors)

In `AppServiceProvider`, add below code fragment in `boot` method

```
use \MilesPong\Horizon\DynamicHorizonSupervisor;

...

public function boot()
{
    $this->app->make(DynamicHorizonSupervisor::class)->initial('YOUR_MASTER_ID', function () {
        return [
            'supervisor-1' => [
                'connection' => 'redis',
                'queue' => ['foo'],
                'balance' => 'auto',
                'processes' => 10,
                'tries' => 3,
                'sleep' => 3,
            ],
            // 'supervisor-2', 'supervisor-3', ...
        ];
    });
}
```

### Deploy New Supervisors

[](#deploy-new-supervisors)

When you want add the supervisors in other procedure rather than the bootstrap, use the way below

```
use \MilesPong\Horizon\DynamicHorizonSupervisor;

app()->make(DynamicHorizonSupervisor::class)->add('YOUR_MASTER_ID', function () {
    return [
        'supervisor-1' => [
            'connection' => 'redis',
            'queue' => ['foo'],
            'balance' => 'auto',
            'processes' => 10,
            'tries' => 3,
            'sleep' => 3,
        ],
        // 'supervisor-2', 'supervisor-3', ...
    ];
});
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

2127d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ba3ffe036650c1ed13bfdda3c84935c17e01ee668ec44cd79098bcbd13378f0?d=identicon)[milespong](/maintainers/milespong)

---

Top Contributors

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

---

Tags

composer-packagelaravelqueuelaravelqueuelaravel horizon

### Embed Badge

![Health badge](/badges/milespong-dynamic-horizon/health.svg)

```
[![Health](https://phpackages.com/badges/milespong-dynamic-horizon/health.svg)](https://phpackages.com/packages/milespong-dynamic-horizon)
```

###  Alternatives

[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)[renoki-co/horizon-exporter

Export Laravel Horizon metrics using this Prometheus exporter.

24152.7k](/packages/renoki-co-horizon-exporter)[pmatseykanets/artisan-beans

Easily manage your Beanstalkd job queues right from the Laravel artisan command

4482.1k](/packages/pmatseykanets-artisan-beans)

PHPackages © 2026

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