Nov 18, 2022

Why Use Laravel Horizon and How To Set It Up?

Laravel Horizon is a queue manager that gives you full control over your queues. lt is a wonderful tool for executing and monitoring queue workers.

Author

Aanchal GoyalAanchal GoyalSenior Software Engineer - II
Why Use Laravel Horizon and How To Set It Up?

🤝 Introducing Redis Queues

Redis Queue is a Python package that allows you to queue jobs for background processing. Because many hosting providers will time out on lengthy HTTP queries, APIs should be designed to close requests as soon as possible. We may do this using Redis Queue by routing jobs to a queue and then to a worker for processing.

With Redis queues, the processing time of queues is faster than the database queues, and to run a high number of jobs on a project, it becomes difficult to run with database queues. Also, you don't get Horizon without Redis.

🤔 Why Laravel Horizon?

The Laravel horizon package is used to manage Laravel-powered Redis queues. It provides a beautiful dashboard for the queues. This package allows users to configure jobs, generate analytics, and monitor queue-related tasks, including job run-time, failure, throughput, etc. The configuration information of all the team members of the project is stored in a single file that can be controlled centrally.

This article shows you how to install and run Laravel horizon in your Laravel application. And in the end, I shall also share why I enjoy working with Laravel. Let’s get started.

✅ Step 1: Installing Redis on MAC and starting the Redis server

First, let me install Redis on my system. If it is already installed in yours, start the server and jump to Step 2.

To install Redis, you need to run the following command.

brew install redis

After installing the redis, start the server by using the below command.

redis-server

If successful, you'll see the startup logs for Redis, and Redis will be running in the foreground.

✅ Step 2: Installing predis and configurations required for Redis in our application

Coming back to our application, let’s add some packages. So, to use Redis with PHP, a PHP Redis client is needed. Therefore, I have installed predis in our application by using the following command.

composer require predis/predis

Open .env and set values as shown below.

Setting values

Make changes in config/database.php and replace 'phpredis' with 'predis'

Code snippet screenshot

✅ Step 3: Installing Horizon package and its configuration

To install the package, run this command in the terminal

composer require laravel/horizon

After installing Horizon, publish its assets using the horizon:install Artisan command:

php artisan horizon:install

After publishing Horizon's assets, its primary configuration file will be config/horizon.php. This configuration file allows us to configure the queue worker options for our application.

✅ Step 4: Starting the horizon

After the successful installation and configuration of the horizon. Now, let’s start our horizon by running the below command in the terminal.

php artisan horizon

And lastly, Horizon exposes its dashboard at the URL: http://127.0.0.1/horizon.

Laravel Dashboard

☑️ Conclusion

After following all the steps given above, you will successfully be able to integrate Laravel Horizon into your application.

As a developer, I found Horizon helpful because of the following -

  • It provides an easier way to manage Redis queues in Laravel.
  • A very readable and understandable dashboard by which we can monitor your queue system.
  • It offers various plugins to send alerts over multiple tools, such as Slack.
  • It delivers an easy-to-use code-driven configuration.
  • It also provides a very efficient auto-scaling of jobs feature.

This article helps you understand Laravel Horizon and interests you in implementing the same in your apps.

Happy Learning!!

Subscribe to Our Newsletter

RELATED ARTICLES

More from the engineering frontline.

Dive deep into our research and insights on design, development, and the impact of various trends to businesses.
Why Legacy Systems Block Real-Time AI Decision-Making
Business

Aug 4, 2026

Why Legacy Systems Block Real-Time AI Decision-Making
Learn how legacy systems limit real-time AI decision-making and what businesses can do to build an AI-ready infrastructure.
What Makes an AI Product Enterprise-Ready? A Business Leader’s Perspective
Business

Aug 4, 2026

What Makes an AI Product Enterprise-Ready? A Business Leader’s Perspective
Most AI pilots never make it to production. Here are the five questions business leaders should ask before approving, buying, or scaling an AI product.
Building AI-Powered Banking CRM Platforms Without Replacing Core Banking Systems
Business

Jul 31, 2026

Building AI-Powered Banking CRM Platforms Without Replacing Core Banking Systems
Banks can modernize CRM with AI without replacing their core banking systems. This guide covers the architecture, use cases, governance, and roadmap to do it.
AI in Fintech: Everyone's Talking, Few are Shipping
Business

Jul 30, 2026

AI in Fintech: Everyone's Talking, Few are Shipping
This blog covers the key engineering, governance, and compliance principles required to build production-ready AI systems for financial services.
ERP and MES Integration for U.S. Pharma Manufacturers: A Roadmap to Achieve Zero-Error Production and End-to-End Traceability
Business

Jul 27, 2026

ERP and MES Integration for U.S. Pharma Manufacturers: A Roadmap to Achieve Zero-Error Production and End-to-End Traceability
A strategic roadmap for U.S. pharma leaders integrating ERP and MES to reduce production errors, accelerate batch release, strengthen compliance readiness, and enable end-to-end traceability across manufacturing sites.
How to Build Medical Device Software with AI: Compliance, Architecture, and Development Process
Business

Jul 24, 2026

How to Build Medical Device Software with AI: Compliance, Architecture, and Development Process
A guide for engineering leaders on building compliant, production-ready AI medical device software, from architecture to FDA clearance.

The Right Conversation Can Save You Six Months.

Whether you’re navigating AI adoption, modernizing legacy systems, or scaling a product - we start by listening. No pitch deck. No template. A real conversation.