[Error] Laravel 6 php artisan make:auth command not defined! [Solved]

By Parth Patel on Feb 13, 2020

Laravel 6 is out! And it brought bunch of improvements with it. But also as this is a major version upgrade, there are some breaking changes. One such major change is the removal of

php artisan make:auth

The make:auth artisan command helps to quickly scaffold the entire authentication system with one command. You will get login and registration functionalities, password reset function along with related blade view pages.

The make:auth command will work for Laravel framework verson below 6 i.e 5.8,5.9 . But v6.0 onwards, it won't work.

But in Laravel 6.0, Taylor decided to remove it from the Laravel core and offer this feature as standalone package called laravel/ui. The main reason behind this is that Laravel doesn't want to decide which css or javascript framework you should use. Thus, it remains framework agnostic for front-end development. Thus, laravel/ui package offers presets for popular frameworks like bootstrap/jquery, tailwindcss, vue.js and can be installed easily.

  • Install laravel/ui package through composer by following command:
    composer require laravel/ui --dev
  • Now you can install auth component for various presets (run any 1 command from below accordingly) :
    php artisan ui bootstrap --auth
    php artisan ui vue --auth
    php artisan ui react --auth
  • After running the above command, it will generate UI files respectively in resources folder. Now run npm install to install javascript dependencies:
    npm install
  • Once the dependencies has been installed, you can compile css and javascript via npm run dev/prod (dev if development env , prod if for production):
    npm run dev

This is how you can generate auth scaffolding in your Laravel application. Let me know in the comments how do you like the new version of Laravel.

Adios