Artisan command “make:auth” is not defined in Laravel 6

后端 未结 9 1237
长发绾君心
长发绾君心 2020-12-01 12:37

I have a problem when creating login/auth in Laravel 6. I typed \"make: auth\" in the terminal and I get an error \"Command\" make: auth \"appears not defined.\" Is there a

9条回答
  •  心在旅途
    2020-12-01 13:20

    One major change introduced in Laravel 6.0 is the removal of php artisan make:auth Command

    Basically, make:auth command was used to create the authentication scaffolding. The concept has not been removed, but the way of implementation has been changed

    Update for Laravel 6: The New Way

    Authentication support is now added with the help of a package now (More details)

    The command to implement Auth is as follows:

    composer require laravel/ui
    php artisan ui vue --auth
    

    This command will install a layout view, registration and login views, as well as routes for all authentication end-points. A HomeController will also be generated to handle post-login requests to your application's dashboard.


    NOTE: If your Login and Register page only shows plain HTML. And CSS is not loading properly then run this two command:

    npm install
    npm run dev
    

提交回复
热议问题