There are no commands defined in the “passport” na

2019-01-28 04:41发布

I am getting below error when i run php artisan passport:install

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "passport" namespace.

标签: laravel-5
2条回答
等我变得足够好
2楼-- · 2019-01-28 05:25

For installing laravel passport make sure you add this line to config/app.php in the providers array (package service providers section):

Laravel\Passport\PassportServiceProvider::class,

Then install the package and migrate the database

composer require laravel/passport
php artisan migrate 
php artisan passport:install

Clearing out the cache is generally helpful first step when commands are not working, especially when you update anything in the config folder on .env files.

php artisan config:clear  
php artisan config:cache 

Config clear removes the configuration cache file. Config cache creates a new configuration cache file with the current settings. Config cache enables faster load times for your apps!

查看更多
放荡不羁爱自由
3楼-- · 2019-01-28 05:33

I got solution. After running following two commands every thing work fine.

run php artisan cache:clear
run php artisan config:cach
查看更多
登录 后发表回答