Php artisan make:auth command is not defined

后端 未结 8 1509
耶瑟儿~
耶瑟儿~ 2020-12-04 09:17

I am trying to run this command in laravel 5.2 but it\'s not working.

php artisan make:auth 

and prompts with these statements.

<         


        
8条回答
  •  甜味超标
    2020-12-04 10:02

    In short and precise, all you need to do is

    composer require laravel/ui --dev
    

    php artisan ui vue --auth and then the migrate php artisan migrate.

    Just for an overview of Laravel Authentication

    Laravel Authentication facilities comes with Guard and Providers, Guards define how users are authenticated for each request whereas Providers define how users are retrieved from you persistent storage.

    Database Consideration - By default Laravel includes an App\User Eloquent Model in your app directory.

    Auth Namespace - App\Http\Controllers\Auth

    Controllers - RegisterController, LoginController, ForgotPasswordController and ResetPasswordController, all names are meaningful and easy to understand!

    Routing - Laravel/ui package provides a quick way to scaffold all the routes and views you need for authentication using a few simple commands (as mentioned in the start instead of make:auth).

    You can disable any newly created controller, e. g. RegisterController and modify your route declaration like, Auth::routes(['register' => false]); For further detail please look into the Laravel Documentation.

提交回复
热议问题