Here is the steps I do:
composer require laravel/horizon
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
cp vendor/laravel/horizon/config/horizon.php config/
Then I execute
php artisan horizon
it show me the error:
[Symfony\Component\Console\Exception\CommandNotFoundException] Command "horizon" is not defined.
Here is the logs:
#0 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(209): Symfony\Component\Console\Application->find('horizon')
#1 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/laravel-stock-calc/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/laravel-stock-calc/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
[2017-08-12 14:30:01] local.ERROR: Symfony\Component\Console\Exception\CommandNotFoundException: Command "horizon" is not defined. in /var/www/laravel-stock-calc/vendor/symfony/console/Application.php:584
Stack trace:
#0 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(209): Symfony\Component\Console\Application->find('horizon')
#1 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/laravel-stock-calc/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/laravel-stock-calc/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
[2017-08-12 14:30:22] local.ERROR: Symfony\Component\Console\Exception\CommandNotFoundException: Command "horizon" is not defined. in /var/www/laravel-stock-calc/vendor/symfony/console/Application.php:584
Stack trace:
#0 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(209): Symfony\Component\Console\Application->find('horizon')
#1 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/laravel-stock-calc/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/laravel-stock-calc/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
Are you using horizon with Laravel 5.5?
Laravel Framework 5.4.32
See #32. There are no plans to support < 5.5.
If horizon only support laravel >= 5.5, why not put the dependency in the composer.josn file?
@terryzwt add this line to your config/app.php in laravel 5.4 project
You need to add a record in providers array.
Laravel\Horizon\HorizonServiceProvider::class,
After this run php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
Then run php artisan horizon.
It should be up and running.
Most helpful comment
@terryzwt add this line to your
config/app.phpin laravel 5.4 projectYou need to add a record in
providersarray.Laravel\Horizon\HorizonServiceProvider::class,After this run
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"Then run
php artisan horizon.It should be up and running.