laravel通过artisan执行passport出现There are no commands defined in the "passport" namespace.

Song5786 次浏览3个评论2018年07月31日

laravel:passport使用中,执行passport出现错误,有如下两种情况:

1、执行命令:php artisan passport:install

> php artisan migrate

Migration table created successfully.

Migrated: 2014_10_12_000000_create_users_table

Migrated: 2014_10_12_100000_create_password_resets_table

d:\web\laravel-passport>php artisan passport:install

[Symfony\Component\Console\Exception\CommandNotFoundException]

There are no commands defined in the "passport" namespace.

解决,主要是没有在config/app.php配置文件中添加

Laravel\Passport\PassportServiceProvider::class,

2、使用Artisan执行出现报错

Artisan::call('passport:install');
dd("213");

发现问题是vendor/laravel/passport文件有问题,所以重新安装解决问题

提交评论

请登录后评论

用户评论

  • Song Song 2017-07-16 04:00:58
    0 赞 0 条评论 回复
    评论
    查看更多评论!
  • Song Song 2017-07-16 04:00:58
    0 赞 0 条评论 回复
    评论
    查看更多评论!

更多相关好文

    当前暂无更多相关好文推荐...