Download the PHP package vdlp/oc-horizon-plugin without Composer
On this page you can find all versions of the php package vdlp/oc-horizon-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vdlp/oc-horizon-plugin
More information about vdlp/oc-horizon-plugin
Files in vdlp/oc-horizon-plugin
Package oc-horizon-plugin
Short Description Laravel Horizon integration for October CMS
License GPL-2.0-only
Homepage https://vdlp.nl
Informations about the package oc-horizon-plugin
Vdlp.Horizon
Provides a seamless integration of Laravel Horizon 5.0 inside October CMS.

Queues, With X-Ray Vision. Supercharge your queues with a beautiful dashboard and code-driven configuration.

A match made in heaven
Horizon is developed by the core developers of the Laravel framework and provides a robust queue monitoring solution for Laravel's Redis queue. Horizon allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures.
Open Source
Horizon is 100% open source, so you're free to dig through the source to see exactly how it works. See something that needs to be improved? Just send us a pull request on GitHub.
Requirements
- October CMS 4.2 or higher
- PHP 8.4 or higher
- PHP extensions:
ext-pcntl,ext-posixandext-redis. - Supervisor, see Laravel 12.x supervisor configuration.
Installation
Turn off auto discovery for laravel/horizon (important)
Because this plugin has it's own HorizonServiceProvider which extends from the Laravel\Horizon\HorizonServiceProvider
we need to prevent the Laravel\Horizon\HorizonServiceProvider from being loaded due to Laravels' auto package discovery.
You should add the dont-discover option to your projects composer.json file (which is located in the root path of your project).
IMPORTANT: After adding these lines, make sure you execute
composer updateto apply the changes. You also need to remove the filestorage/framework/packages.phpfile. No worries. This file will be re-generated once you access your project.IMPORTANT: Make sure the
composer.jsonis deployed to your hosting site. This will be parsed by te framework to determine which service providers should be ignored.
Configuration
-
Configure Laravel Horizon settings file at
config/horizon.php, please make sureusecontainshorizon(see the configuration snippet below). -
Add connection to
config/queue.php: -
Add Redis database configuration for Horizon specifically to
config/databases.php: -
Modify the queue connection
QUEUE_CONNECTION(which can be found inconfig/queue.php) toredisas such: .envshould at least have the followingQUEUE_andHORIZON_variables:
It's recommended to add your Queue Worker Configuration config.horizon.environments to the .env file as well.
Server configuration
- Add the following to the
supervisordconfiguration on the server. The completesupervisordconfiguration can be found on the supervisor website. -
See Configuring Supervisor (Official Laravel Documentation).
- Add the following to the cronjob configuration on the server. This will make sure the Horizon metrics are created periodically.
Creating Job classes
Follow the instructions at Laravel 12.x generating job classes on how to make Job classes.
Please note that the use of the
php artisan make:jobcommand is not supported in October CMS. October CMS is using a different application structure in comparison to a generic Laravel project.
This plugin also contains an example job file: Vdlp\Horizon\Example.
This example file does not use the SerializesModels and InteractsWithQueue trait.
Testing
- Log-in to the backend.
- Put application in debug mode using the
.envfile:APP_DEBUG=trueor by changing thedebugkey in theconfig/app.phpfile. - Run Horizon using this command:
php artisan horizon. -
Now run this command to push some
Vdlp\Horizon\Examplejobs to the queue: - Check the Horizon dashboard at
/backend/vdlp/horizon/dashboardor at/horizon. - Each
Vdlp\Horizon\Examplejob should log a random string to the application log (level =debug).
Documentation
Please go to the Laravel website for detailed documentation about Laravel Horizon.
Questions
If you have any question about how to use this plugin, please don't hesitate to contact us at [email protected]. We're happy to help you. You can also visit the support forum and drop your questions/issues there.
All versions of oc-horizon-plugin with dependencies
ext-pcntl Version *
ext-posix Version *
ext-redis Version *
composer/installers Version ^1.0 || ^2.0
laravel/horizon Version ^5.24.4
october/rain Version ^4.2