[英]Php artisan make:auth not defined in Laravel 9
當我嘗試運行此命令時 php artisan 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
安裝 Laravel 9 后,您需要安裝 laravel/ui package 以便在 laravel 9 中生成身份驗證。
composer require laravel/ui
而不是選擇其中之一
php artisan ui bootstrap --auth php artisan ui vue --auth php artisan ui react --auth
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
如果您沒有在身份驗證頁面中獲得樣式,請在 tha layouts>path 文件中使用以下鏈接
link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
Omer YILMAZ 是對的,但是!
為了完成 UI 安裝過程,您需要安裝正確版本的 vite 和 nodejs。
因為 Laravel 9 需要 vite3+ 而 vite 需要 nodejs 14+ 版本
我的案例:我需要安裝 ubuntu 20.04 上的 WSL2
npm install && npm run dev
as needed。我希望它有幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.