解决用户认证脚手架命令 no commands defined in the "ui" namespace 的问题
>php artisan ui:auth
There are no commands defined in the "ui" namespace.
使用7.28的版本新建了一个项目,但是执行认证脚手架命令的时候报错。需要安装 laravel/ui
>composer require laravel/ui
Using version ^3.0 for laravel/ui
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v7.28.2
- Conclusion: don't install laravel/framework v7.28.2
还是报错,这个是版本错误,改用一个低版本就OK了
>composer require laravel/ui:2.*
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing laravel/ui (v2.4.0): Downloading (100%)
安装成功,之后执行命令OK
>php artisan ui vue --auth
Vue scaffolding installed successfully.
Please run "npm install && npm run dev" to compile your fresh scaffolding.
Authentication scaffolding generated successfully.
总之,两条命令composer require laravel/ui:2.*
php artisan ui vue --auth
本作品采用《CC 协议》,转载必须注明作者和本文链接