📜  https:stackoverflow.com 问题 34545641 php-artisan-makeauth-command-is-not-defined - PHP (1)

📅  最后修改于: 2023-12-03 15:01:20.769000             🧑  作者: Mango

php artisan make:auth command is not defined - PHP

Recently, you might have faced the error php artisan make:auth command is not defined while trying to generate authentication scaffolding using the make:auth command in Laravel.

This error occurs because the make:auth command is deprecated in Laravel 6.x and newer versions. You need to use the Laravel UI package to generate authentication scaffolding.

Here are the steps to generate authentication scaffolding in Laravel 6.x and newer versions using the Laravel UI package:

  1. Install the Laravel UI package using composer:
composer require laravel/ui
  1. Generate basic scaffolding using the following command:
php artisan ui vue --auth

Note: You can replace vue with react or bootstrap depending upon your preference.

  1. Install the generated packages using npm or yarn:
npm install && npm run dev 

or

yarn install && yarn dev 

After following these steps, you will have authentication scaffolding in your Laravel application.

If you still face any issues, feel free to ask on StackOverflow with a detailed description of the error and relevant code snippets.