Php artisan make:auth command is not defined

后端 未结 8 1495
耶瑟儿~
耶瑟儿~ 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:04

    Update for Laravel 6

    Now that Laravel 6 is released you need to install laravel/ui.

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

    You can change vue with react if you use React in your project (see Using React).

    And then you need to perform the migrations and compile the frontend

    php artisan migrate
    npm install && npm run dev
    

    Source : Laravel Documentation for authentication

    Want to get started fast? Install the laravel/ui Composer package and run php artisan ui vue --auth in a fresh Laravel application. After migrating your database, navigate your browser to http://your-app.test/register or any other URL that is assigned to your application. These commands will take care of scaffolding your entire authentication system!

    Note: That's only if you want to use scaffolding, you can use the default User model and the Eloquent authentication driver.

提交回复
热议问题