To install Laravel Horizon in Laravel 7, run below command in your terminal:
composer require laravel/horizon "^4.0"
.
If you are using Windows and get the error Problem 1
- laravel/horizon[v4.0.0, ..., 4.x-dev] require ext-pcntl * -> it is missing from your system. Install or enable PHP's pcntl extension.
- Root composer.json requires laravel/horizon ^4.0 -> satisfiable by laravel/horizon[v4.0.0, ..., 4.x-dev].
, use the below command instead:
composer require laravel/horizon "^4.0" --ignore-platform-reqs
Also note that from this point on when using Windows, you may have to add --ignore-platform-reqs
on all subsequent composer commands if not they will fail. See this Stackoverflow answer if you will like to skip adding this every time.