Laravel Login LogOut using Authentication

Written by | Posted on March 19th, 2018
Laravel Login LogOut using Authentication

Laravel is the most popular PHP Framework that a lot of well documented and options for your project even if it is a large scaling or small-scale project. Today I will teach you on how to step by step configuration of Laravel Login LogOut using Authentication.

Step 1:

Create a database name “auth” for your Login LogOut using Authentication as you see the picture below.

Create Database on phpMyAdmin

And then on your .env file located in your Laravel root directory, you can set your Database connection information like Database localhost, username, and password and save it.

Configure Laravel Database on .env


Step 2:

Got to your MS dos command where located to your auth project file “C:\xampp\htdocs\auth” and type “php artisan make:auth” to make or generate the scaffold basic login log out and registration views and routes.

PHP Artisan Make Auth

If you go to your root directory file “C:\xampp\htdocs\auth\routes\web.php” you can see Auth::routes(); it is a helper class that can handle the endpoint for registration, login, password reset things like that.

Routes File


Step 3: 

We’re gonna switch back to your Dos command terminal located in your auth project folder “C:\xampp\htdocs\auth” then type “php artisan migrate” and then boom! voila, you have migrated them to the database, that’s it you have generated the login log out and registration, password reset.

PHP Artisan Migration Successfully Migrated

Step 4: 
Last and 4rth take a look at the registration and login form it is a basic Laravel default generated by the authentication, I will show you some of the file structures where you can edit your the HTML and CSS.

This is the home page or landing page of your Laravel authentication.Laravel Home

And the registration form
Laravel Registration Form

I will show you from above the HTML CSS file structures where you can edit the front-end code navigate this root directory file “C:\xampp\htdocs\auth\resources\views\auth”.

Auth file for views


Ok, guys, this is the end of Laravel Login Log Out using Authentication tutorial I hope it helps your simple projects let me know comment down below feel free to ask some question.

Happy coding 🙂