Skip to main content

Installation

You can install the package via Composer:

composer require fabianpnke/horizon-db-driver

This package requires laravel/horizon to already be installed and configured (see Horizon's own installation docs).

The package's service provider is discovered automatically via Laravel's package auto-discovery — no manual registration needed.

Publish and run the migrations

php artisan vendor:publish --tag="horizon-db-driver-migrations"
php artisan migrate

The migration creates the tables the database driver stores Horizon's state in:

  • horizon_jobs
  • horizon_tags
  • horizon_monitored_tags
  • horizon_supervisors
  • horizon_master_supervisors
  • horizon_processes
  • horizon_metrics
  • horizon_metric_snapshots
  • horizon_metric_meta
  • horizon_command_queue
  • horizon_locks

Publish the config file (optional)

php artisan vendor:publish --tag="horizon-db-driver-config"

This publishes config/horizon-db-driver.php, covered in Configuration.

Next step

Continue to Usage to point a queue connection at the database driver so Horizon has jobs to work.