Beginners Guide - Laravel 7 Authentication Solved. [Make:auth]

Beginners Guide - Laravel 7 Authentication Solved. [Make:auth]

By Beautiful

Beginners Guide - Laravel 7 Authentication Solved. [Make:auth]

Beginners Guide - Laravel 7 Authentication Solved. [Make:auth]


Laravel provides a separate composer package for creating make:auth scaffold in Laravel 7 application. Whenever you want to create an auth in laravel 7 then you must have to install laravel/ui package in Laravel 7.

Using laravel/ui you can create a simple view with auth, but you have to use bootstrap, vue js, or react js with auth view in Laravel 7. It is not provided as default, you have to follow a few steps to create the auth scaffold in your Laravel 7 application.

First, you need to install laravel/ui package as below:

There are different ways for creating the auth scaffold in laravel 7 application. The first way is:
laravel new blog --auth
The other ways work when you have already created your new project, but before using any of these options you must first install the laravel/ui package. So run this:
composer require laravel/ui
Next, choose any of these options:

1. Bootstrap
php artisan ui bootstrap --auth
2. Vue
php artisan ui vue --auth
3. React
php artisan ui react --auth
Next,  run npm command, otherwise, you can not see a better layout of the login and register page.

Install NPM
npm install
Run NPM
npm run dev
Note: If you have already run the 'php artisan ui bootstrap' command or vue or react without including the --auth, another way you can make:auth scaffold, in this case, is by running the code below:
php artisan ui:auth
This will also create the Laravel 7 make:auth scaffold for your project. Don't forget to install and run npm afterward.

Next, you can run artisan serve.
php artisan serve
I hope this works for you.

❤️ from Pinkotab Co.

Posts Comments