6

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

php artisan voyager:install

I am getting this error message:

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

Here is my PhP and Laravel version:

Laravel Framework version 5.3.16

λ php -v PHP 7.0.13 (cli) (built: Nov 8 2016 13:45:28) ( ZTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

And my package service providers:

/* * Package Service Providers... */

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

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

3 Answers 3

1

Looks like you didn't install it. Comment out or remove service providers from the list and run these commands:

composer require tcg/voyager
composer dumpauto

According to the docs, next step will be adding a service provider to the config/app.php:

TCG\Voyager\VoyagerServiceProvider::class,

And only then run php artisan voyager:install command.

Sign up to request clarification or add additional context in comments.

7 Comments

But why if I didn't install it, it stI'll appears in composer.json. I will give it a go and see if that helps
@Przemek how did you install it? What error message did you see? Did you see a message about published commands or something like this?
I installed it using composer require just as you mentioned above. Didn't see any error messages while installing. After I have added that package and tried to run php artisan voyager:install and I've got that error message which is in the question
your solution didn't help, still getting same error message
Same problem here and the advice (above, which is the same as on the repo) doesn't work.
|
0
php artisan config:clear

solved my problem

Comments

0

If you have successfully executed the command line:

composer require tcg/voyager

You must have the line "tcg/voyager": "^1.2" in the require section of your composer.json file, in this case the command line "composer dumpautoload" will automatically perform all the packages discovery for you. Otherwise do the following :

add the line of code: TCG\Voyager\VoyagerServiceProvider::class to the file "config/app.php". Then run the following command line :

composer dumpautoload

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.