PHPackages                             elyerr/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. [Caching](/categories/caching)
4. /
5. elyerr/horizon

ActiveLibrary[Caching](/categories/caching)

elyerr/horizon
==============

Dashboard and code-driven configuration for Laravel queues with CSP support

v5.1.2(2w ago)03541MITPHPPHP ^8.0CI passing

Since Dec 8Pushed 2w agoCompare

[ Source](https://github.com/elyerrlabs/horizon)[ Packagist](https://packagist.org/packages/elyerr/horizon)[ RSS](/packages/elyerr-horizon/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (41)Versions (6)Used By (1)

[![Laravel Horizon](/art/logo.svg)](/art/logo.svg)

[![Build Status](https://github.com/laravel/horizon/workflows/tests/badge.svg)](https://github.com/laravel/horizon/actions)[![Total Downloads](https://camo.githubusercontent.com/01e02997f6c1f1e318b9f9aaf0dfaed6061bebf946b880b547144e6aedc6d392/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2f686f72697a6f6e)](https://packagist.org/packages/laravel/horizon)[![Latest Stable Version](https://camo.githubusercontent.com/a99aa51a23f04607ef0cab1b50cd00d5811166636aaa7bfadac376e2ce8011a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2f686f72697a6f6e)](https://packagist.org/packages/laravel/horizon)[![License](https://camo.githubusercontent.com/680fb4d13b1f5c8b416c7678a29edb97d7551e6656d7ad7baf3332b1ba879f9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c2f686f72697a6f6e)](https://packagist.org/packages/laravel/horizon)

Introduction
------------

[](#introduction)

Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered Redis queues. Horizon allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures.

All of your worker configuration is stored in a single, simple configuration file, allowing your configuration to stay in source control where your entire team can collaborate.

[![](example.png)](example.png)

Official Documentation
----------------------

[](#official-documentation)

Documentation for Horizon can be found on the [Laravel website](https://laravel.com/docs/horizon).

---

### Homepage Route

[](#homepage-route)

You can configure a custom application homepage route through the Horizon configuration file.

This route is used by the **Home** button displayed in the Horizon interface, allowing users to quickly return to the main application dashboard.

```
'homepage' => 'home',
```

The value must be the name of a registered Laravel route.

Example:

```
'homepage' => 'dashboard',
```

If your application uses a custom dashboard or landing page, simply set the corresponding route name in the configuration.

---

✨ Content Security Policy (CSP) Support for Horizon
---------------------------------------------------

[](#-content-security-policy-csp-support-for-horizon)

**Laravel Horizon** adds **full Content Security Policy (CSP) compatibility**, including automatic nonce generation and safe injection into all Horizon inline `` and `` tags.

Modern CSP configurations disallow inline scripts/styles unless they include a valid `nonce`. The original Horizon UI relied on multiple inline scripts, which made it incompatible with strict CSP setups.

Now the Horizon UI so it works correctly under:

- `script-src 'self' 'nonce-...'`
- strict `style-src` rules
- browsers where `unsafe-inline` and `unsafe-eval` are forbidden
- enterprise-grade security environments

---

### 📘 Content Security Policy (CSP) Support

[](#-content-security-policy-csp-support)

**Content Security Policy (CSP)** is a security standard that helps protect web applications from XSS and content injection attacks. It works by defining which scripts, styles, and external resources are allowed to run.

This fork adds **full, native CSP support to Laravel Horizon**, allowing you to keep strong security rules **without** needing to weaken your policy.

---

🔧 How CSP Support Works
-----------------------

[](#-how-csp-support-works)

This version of Horizon automatically uses the CSP **nonce** you generate in your application and applies it to:

- inline `` tags
- inline style attributes
- Horizon’s boot scripts
- required `` elements (such as fonts or preconnect)

The middleware in your app **shares the nonce globally**, making it available to all Blade views, including Horizon.

---

⚙️ Usage
--------

[](#️-usage)

1. Generate a nonce on each request in a middleware.
2. Share the nonce globally (e.g., `view()->share('nonce', $nonce)`).
3. Attach your CSP headers.
4. Register the middleware in the web group.

Horizon will automatically detect the nonce and apply it internally.

---

📄 Example Middleware (Oauth2 Passport Server)
---------------------------------------------

[](#-example-middleware-oauth2-passport-server)

Your middleware implementation can be seen here:
**SecureHeaders:**

It handles:

- generating the nonce
- sharing the nonce globally
- applying CSP headers
- providing Horizon-specific CSP rules

---

### 📁 Kernel Registration

[](#-kernel-registration)

#### Laravel 10 and below

[](#laravel-10-and-below)

```
protected $middlewareGroups = [
    'web' => [
        \App\Http\Middleware\SecureHeaders::class,
        // other middlewares...
    ],
];
```

#### Laravel 11+

[](#laravel-11)

```
$middleware->web(
    append: [
        SecureHeaders::class,
        // other middlewares...
    ]
);
```

---

Contributing
------------

[](#contributing)

Thank you for considering contributing to Horizon! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

Code of Conduct
---------------

[](#code-of-conduct)

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/laravel/horizon/security/policy) on how to report security vulnerabilities.

License
-------

[](#license)

Laravel Horizon is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance96

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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

Total

4

Last Release

18d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/966b515d3fb063763019b1950c8c9b4891373924e10f6867420525a726e08217?d=identicon)[elyerr](/maintainers/elyerr)

---

Top Contributors

[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (425 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (372 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (194 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (47 commits)")[![amirhshokri](https://avatars.githubusercontent.com/u/123773211?v=4)](https://github.com/amirhshokri "amirhshokri (29 commits)")[![halaei](https://avatars.githubusercontent.com/u/7089140?v=4)](https://github.com/halaei "halaei (22 commits)")[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (18 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (17 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (17 commits)")[![Cannonb4ll](https://avatars.githubusercontent.com/u/3110750?v=4)](https://github.com/Cannonb4ll "Cannonb4ll (17 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (16 commits)")[![elyerr](https://avatars.githubusercontent.com/u/94133542?v=4)](https://github.com/elyerr "elyerr (16 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (12 commits)")[![michaeldyrynda](https://avatars.githubusercontent.com/u/558441?v=4)](https://github.com/michaeldyrynda "michaeldyrynda (9 commits)")[![dbpolito](https://avatars.githubusercontent.com/u/347400?v=4)](https://github.com/dbpolito "dbpolito (9 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (8 commits)")[![paras-malhotra](https://avatars.githubusercontent.com/u/16099046?v=4)](https://github.com/paras-malhotra "paras-malhotra (7 commits)")[![jpuck](https://avatars.githubusercontent.com/u/15305396?v=4)](https://github.com/jpuck "jpuck (7 commits)")[![tomswinkels](https://avatars.githubusercontent.com/u/9036151?v=4)](https://github.com/tomswinkels "tomswinkels (6 commits)")[![PrinsFrank](https://avatars.githubusercontent.com/u/25006490?v=4)](https://github.com/PrinsFrank "PrinsFrank (6 commits)")

---

Tags

csplaraveloauth2oauth2-passport-serverqueuesredislaravelqueue

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M305](/packages/laravel-horizon)[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M131](/packages/laravel-pulse)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)

PHPackages © 2026

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