olssonm/horizon-status

Utility to check the status of Lavarel Horizon instances programmatically
1,748 1
Install
composer require olssonm/horizon-status
Latest Version:v1.4
PHP:^8.2
License:MIT
Last Updated:Mar 20, 2026
Links: GitHub  ·  Packagist
Maintainer: olssonm

Latest Version on Packagist Build Status Software License

Laravel Horizon status checker

Simple utility to check the current status of your Laravel Horizon instance programatically.

Why?

Why use this package if the Artisan command horizon:status is available? Because there are times that the need to check the status programatically emerge. For example, if you via scheduling want to make sure that your Horizon-instance is running and you don't want to parse strings or the like:

// app/Console/Commands/HorizonIsRunning.php
use Olssonm\HorizonStatus\Facades\HorizonStatus;

public function handle() {
    if(!HorizonStatus::isActive()) {
        // Notify admin (not via the Horizon-queue of course...)
    }
}

// app/Console/Kernel.php
protected function schedule(Schedule $schedule) {
    $schedule->command('horizon:is-running')->everyFiveMinutes();
}

Or perhaps you want to have a status-icon clearly visible directly in your blade-template:

@if(HorizonStatus::isActive())
    <div class="success">Horizon is running</div>
@else
    <div class="warning">Horizon is down</div>
@endif

Installation

composer require olssonm/horizon-status

Note – This package requires Laravel Horizon running on either Laravel 12 or 13.

Usage

There are four methods available with this package.

status

Returns one of the three available statuses, active, inactive or paused.

use Olssonm\HorizonStatus\Facades\HorizonStatus;

HorizonStatus::status();
// active

isActive

Return true or false whether status is active:

use Olssonm\HorizonStatus\Facades\HorizonStatus;

HorizonStatus::isActive();
// true

isInactive

Return true or false whether status is inactive:

use Olssonm\HorizonStatus\Facades\HorizonStatus;

HorizonStatus::isInactive();
// false

isPaused

Return true or false whether status is paused:

use Olssonm\HorizonStatus\Facades\HorizonStatus;

HorizonStatus::isPaused();
// false

License

The MIT License (MIT). Please see the LICENSE.md for more information.

© 2022 Marcus Olsson.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

404,034,618 608
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

384,821,166 4,658