How to generate default scaffolding in laravel-6.0

As you know that laravel 5.* version provide you default authentication by one single command.
But After Laravel 6.0 It’s not that easy to run one command and get Authentication ready.

I’ll let you know the reason behind that, As you know laravel latest Laravel 6.0 LTS is already launched by laravel on 3rd September, 2019 by Laravel team.
The team laravel doing such as good performance and reduce the load of developer and made the process of development quite easy.

But in laravel 5.* it’s very very easy to generate authentication scaffolding by hit one command.

php artisan make:auth

You can run this command in laravel 5.* and you may check that your authentication is ready to use, initially it was came with the Vue/Bootstrap js based scaffolding by default, But now laravel 6.0 uses npm to install both of these front-end packages.

For that laravel provides laravel/ui Composer package, which may be installed using Composer

Do not worry I’ll help you to generate auth in laravel 6.0, for that you need to follow the below steps.

Install fresh laravel.

laravel new project_name

Once installation is done you may start your development server.

php artisan serve

In laravel 5.0 it’s 3rd step to generate authentication, but in laravel 6.0 you may need to install composer package for the laravel/ui first by using this.

composer require laravel/ui --dev

Once this package is installed, then you may install your scaffolding using the ui Artisan command

php artisan ui vue --auth
php artisan ui react --auth

After installing the laravel/ui Composer package and generating the front-end scaffolding, but not get your css and js default which laravel provide to you so for that you have to follow the 2 more steps.

Laravel contact CSS in SASS format so its need to compile first before convert to CSS,So before compiling your CSS, install your project’s front-end dependencies using the Node package manager (NPM):

npm install

Once the dependencies have been installed using above command, you can compiled your SASS CSS using laravel mix.

now run this last command and you may able to see your default scaffolding.

npm run dev

Once done with above command now you can check you may have your default authentication scaffolding generated, and you will find your css file in public/css folder.

And using the above steps you may generate your scaffolding in laravel 6.0.

I hope you like this post and for more like this please like, share and comment for more detail. 😀 🙂 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *