2017 © Pedro Peláez
 

library horizon

Dashboard and code-driven configuration for Laravel queues.

image

vzool/horizon

Dashboard and code-driven configuration for Laravel queues.

  • Tuesday, February 20, 2018
  • by vzool
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 251 Forks
  • 1 Open issues
  • 22 Versions
  • 50 % Grown

The README.md

, (*1)

Build Status Total Downloads Latest Stable Version License , (*2)

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., (*3)

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., (*4)

Setup

  1. Install by composer (required PHP 7.1+)
composer require vzool/horizon
  1. Add the following to config/app.php
'providers' => [

    // ..

    Vzool\Horizon\HorizonServiceProvider::class,
],
'aliases' => [

    // ..

    "Horizon" => Vzool\Horizon\Horizon::class,
]
  1. Do artisan command

php artisan vendor:publish
  1. Add the follow to app\Providers\AppServiceProvider.php in order to secure /horizon end point.
<?php

namespace App\Providers;

// ..

use Vzool\Horizon\Horizon;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // ..

        // Add Horizon authentication [IGNORE IN DEV]

        Horizon::auth(function ($request) {

            // allow admins  only to see this page 
            // return \Auth::user()->is_admin;
            // or return any true / false
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}

  1. Browse /horizon and have fun with your X-Ray Vision. ;)

Official Documentation

Documentation for Horizon can be found on the Laravel website., (*5)

License

Laravel Horizon is open-sourced software licensed under the MIT license, (*6)

The Versions