Laravel 5 Login And Register Authentication

Laravel 5 Login And Register Authentication

By : Laravellogic Created : July 8, 2019 View : 22

Hello Friend, in this tutorial i will be make login and register authentication system in laravel applications. Laravel is a best PHP framework and free, open-source. authentication is very important part of all web application. 

Laravel provide auth command to create automatically login register reset password module and best secure authentication for web application. Currently, it is the most adjective PHP project on Github and a lot of companies and people all over the world use it to build amazing applications. 

I hope you will like it. Please take a look at the below step.

Step 1: install laravel

 Open terminal and run the following command to create a new laravel web application

composer create-project --prefer-dist laravel/laravel app_name

Step 2: Rename .env.example to .env

After create project goto project folder and get .env file? if no rename .env.example to .env 

Step 3: key generate

Open terminal and run the following command to generate laravel app key  

php artisan key:generate

Step 4: seting .env file

Open .env file and add credentials

DB_CONNECTION=mysql 
DB_HOST=127.0.0.1 
DB_PORT=3306 
DB_DATABASE=db_name 
DB_USERNAME=db_user 
DB_PASSWORD=db_pass

edit your db_name, db_user and db_pass

Step 5: install auth

Open terminal and run the following command to generate login register and reset password module and users migrate table

php artisan make:auth

Step 6 create table

Open terminal and run the following command to generate 3 table users password_resets and migrations

php artisan migrate

Step 7 run project 

Demo is ready, you are ready, let's go run the code following command

php artisan serve

ow you can open following URL on your browser: http://localhost:8000

If any question, add below comment.