If this is your first time using Laravel 6 or 7 and also trying to scaffold login authentication you’ll quickly discover that
make:auth command is no longer working — this is because there was an update on Laravel 6 and above which they moved the authentication scaffolding into a separate laravel/ui package.
Today I will show you how to scaffold and bootstrap your Laravel 6 app with login authentication.
Use CLI to access your Laravel project folder for my case the Laravel app folder is blog.
$ cd blog
$ composer require laravel/ui
$ php artisan ui vue --auth
After initiating this command from CLI
php artisan ui vue --auth Laravel will create all required files needed for your login authentication to function. Auth controllers files would be found here in this folder on your project
Controller/auth and the views will be here
Now run your Laravel app
$ php artisan serve
Viewing your authentication login page you’ll notice that no styling was added by Laravel. This is because the UI package for laravel 6 and above has been separated which does not come with styling out of the box. To add the styling you need to compile the UI files which take us to the next step.
Download Node package manager if you don’t have one click here to download.
After installation of node package manager open your CLI and type the command.
$ npm install
$ npm run dev
Run your Laravel application and access it from your browser it would look like this:
You can read more about scaffolding Laravel app from the documentation.
You have seen how to scaffold login authentication on Laravel 6 and above and how the command syntax differs from previous versions with these simple steps. If you’ve any issues while scaffolding your login authentication feel free to drop your comment below.