Voyager - (Symfony \ Component \ Console \ Exception \ CommandNotFoundException] There are no commands in the "voyager" namespace,

So, I'm trying to install Voyager for my laravel, but when I insert

php artisan voyager: install

I get this error message:

(Symfony \ Component \ Console \ Exception \ CommandNotFoundException] There are not commands defined in the "voyager" namespace)

Here is my version of PhP and Laravel:

Laravel Framework version 5.3.16

Ξ» php -v PHP 7.0.13 (cli) (built: Nov 8, 2016 1:45:28 p.m.) (ZTS) Copyright (c) 1997-2016 PHP Group Zend Engine v3.0.0, copyright (c) 1998-2016 . Zend technologies

And my service provider providers:

/ * * Package service providers ... * /

TCG\Voyager\VoyagerServiceProvider::class, Intervention\Image\ImageServiceProvider::class, 

So what is the problem? why am i getting this error message

+5
source share
2 answers

It looks like you did not install it. Comment on or remove service providers from the list and run the following commands:

 composer require tcg/voyager composer dumpauto 

According to the docs , the next step is to add a service provider to config/app.php :

 TCG\Voyager\VoyagerServiceProvider::class, 

And only then run the php artisan voyager:install command.

+1
source
 php artisan config:clear 

solved my problem

0
source

Source: https://habr.com/ru/post/1263385/


All Articles