Artisan command "make:auth" is not defined in Laravel 6
Looks like L6 moves the Auth scaffolding into a separate package.
https://laravel.com/docs/6.0/authentication
Want to get started fast? Install the
laravel/ui
Composer package and runphp artisan ui vue --auth
in a fresh Laravel application.
Laravel 8.x
This command will create a new application with all of the authentication scaffolding compiled and installed:
laravel new kitetail --jet
Laravel's laravel/jetstream package provides a quick way to scaffold all of the routes and views you need for authentication using a few simple commands:
composer require laravel/jetstream
// Install Jetstream with the Livewire stack...
php artisan jetstream:install livewire
// Install Jetstream with the Inertia stack...
php artisan jetstream:install inertia
Github : laravel /jetstream
Official Documentation : Laravel Jetstream Documentation
Laravel 7.x
composer require laravel/ui --dev
php artisan ui vue --auth
Laravel 6.x
Laravel's laravel/ui package provides a quick way to scaffold all of the routes and views you need for authentication using a few simple commands:
composer require laravel/ui "^1.0" --dev
php artisan ui vue --auth
After above commands, you'll get following output :-
Vue scaffolding installed successfully.
Please run "npm install && npm run dev" to compile your fresh scaffolding.
Authentication scaffolding generated successfully.
Now after running this command run this command, for Vue scaffolding
npm install && npm run dev
If you're get following error message
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/home/shiv/.npm"
npm ERR! code EACCES
npm ERR! syscall open
Then give permission user to access .npm files from system
sudo chown -R 1000:1000 "/home/system_user_name/.npm"
As i now understood clearly,running "sudo command is dangerous for npm configurations"
Please look it this threat for more clear understanding :- npm throws error without sudo
In Laravel 6.0 make:auth no longer exists. Read more here
1 - First do this:
composer require laravel/ui
Note: Laravel UI Composer package is a new first-party package that extracts the UI portion of a Laravel project ( frontend scaffolding typically provided with previous releases of Laravel ) into a separate laravel/ui package. The separate package enables the Laravel team to update, develop and version UI scaffolding package separately from the primary framework and the main Laravel codebase.
2 - Then do this:
php artisan ui:auth
instead of
php artisan make:auth ( which works for Laravel 5.8 and older versions )
It will generate the auth routes, a HomeController, auth views, and a app.blade.php layout file.
You can also generate the views only with:
php artisan ui:auth --views
The console command will prompt you to confirm overwriting auth files if you've already run the command before.
More Options here
// Generate basic scaffolding...
php artisan ui vue
php artisan ui react
and also:
// Generate login / registration scaffolding...
php artisan ui vue --auth
php artisan ui react --auth