Laravel 5.7 Login Authentication Register with Example
Laravel 08-Aug-2020

Laravel 5.7 Login Authentication Register with Example

Laravel login authentication register with example. In this laravel toturial, we will study about how to create laravel login authentication and register with example .Step by Step Guide to Building Your First laravel login authentication and register  Laravel Application. A complete step by step complete guide.

Basic laravel login register and authentication system is also work with diffrent laravel version like
5.8, 5.7 & 5.6 .


  • First Install Laravel Fresh Project
  • Configuration changes in .env file
  • Generate Laravel Application Key
  • Database Migration
  • Create a Login Authentication  Laravel
  • Now Test Project
  • Conclusion

1. First Install Laravel Fresh Project

First we have install laravel new setup in our system . where we installed php. open your terminal and type the below command :

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

Note : In this command firstApp is project folder name

Your using ubuntu machine. open your terminal and go to your project root directory and type the command in command prompt :

sudo chmod  -R 777 storage

sudo chmod  -R 777 bootstrap

2. Configuration changes in .env file

After successfully installed the laravel application, in the next step is  configuration .evn file. Let’s open .env file and setup database credential like database name , database user name , databasse password and host.

laravel login .env

Laravel .env

3. Generate Laravel Application Key

Configuration compeleted successfully of .evn file , Let’s open the command prompt and generate laravel application key using this given below command.

php artisan key:generate

4. Database Migration

Before you run php artisan migrate command.

Go to the app/providers/AppServiceProvider.php and put the two line of code inside a boot method

Use Schema; 

public function boot() { 



Use this below command , it will automatic created tables in your database. A new migration file is created by you. You update the code in that migration, run php artisan migrate again, and you have a new column in your table.

php artisan migrate
php artisan migrate

php artisan migrate

5. Laravel Authentication

This command will create routes , controllers and views  files for Laravel Login Authentication and registration. It means provide a basic laravel login authentication and registration Complete system. Let’s open the command propmt and type the below command.

php artisan make:auth
php artisan make:auth

php artisan make auth

6. Now Test Project

In this step to use the php artisan serve command .it will start your server locally

php artisan serve

If you want to run the project diffrent port so use this command

php artisan serve --port=8080 

laravel authentication is successfully completed, Now Go to the browser and hit the

URL : http://localhost:8000/authentication

If you not run php artisan server command , direct go to your browser and type the url

URL : http://localhost/firstApp/public/

live demo youtube :

On your browser see this :

  • Laravel Login

laravel regirstration

Laravel Register

laravel login dashbaord

Laravel Login Dashboard

7. Conclusion

We have successfully install laravel application and created laravel login authentication.

If you have any questions or thoughts to share, use the comment form below to reach us.