Php手工制作:Laravel 9中未定义身份验证

nkoocmlb  于 2022-12-24  发布在  PHP
关注(0)|答案(3)|浏览(355)

当我试图运行这个命令php工匠make:auth...下面的错误来了.有没有任何方法来运行这个命令,或任何替代这个命令,我应该安装amy包这个命令?

Command "make:auth" is not defined.
    
      Did you mean one of these?
          make:cast
          make:channel
          make:command
          make:component
          make:controller
          make:event
          make:exception
          make:factory
          make:job
          make:listener
          make:mail
          make:middleware
          make:migration
          make:model
          make:notification
          make:observer
          make:policy
          make:provider
          make:request
          make:resource
          make:rule
          make:scope
          make:seeder
          make:test

Laravel Framework 9.8.1
b4lqfgs4

b4lqfgs41#

安装Laravel 9后,您需要安装laravel/ui包,以便在laravel 9中生成身份验证。

composer require laravel/ui

而不是选择其中之一

php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
niknxzdl

niknxzdl2#

php artisan ui:auth .它对我起作用了.你可以在命令下面看到它。

Command "make:auth" is not defined.  
Did you mean one of these?
make:cast
make:channel
make:command
make:component
make:controller
make:event
make:exception
make:factory
make:job</p>
make:listener</p>
make:mail</p>
make:middleware
make:migration
make:model
make:notification
make:observer
make:policy
make:provider
make:request
make:resource
make:rule
make:seeder
make:test
ui:auth

如果您没有在授权页面中获得样式,请使用布局〉路径文件中的以下链接

link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
kjthegm6

kjthegm63#

奥默·耶尔马兹是对的,但是!
为了完成UI安装过程,您需要安装正确版本的vite和nodejs。
因为Laravel 9需要vite 3+和vite需要nodejs 14+版本
我的案例:我需要安装ubuntu20.04上的wsl 2
1.安装nvm(使用不同版本的nodejs)
1.安装nodejs(16个就可以了)
1.只有在那时,我才能成功地运行命令:npm install && npm run dev根据需要。
希望能有所帮助

相关问题