Laravel 6 Login & Registration Example Tutorial From Scratch

Laravel login and registration integration is very easy. Laravel comes with inbuilt login, signup, forget password and reset password feature. Laravel tutorial for beginners step by step guide to building your first laravel login and registation. A complete step by step complete guide.

laravel 6 is recently release with great new features and improvents. We are going to show you how to create login and register auth system using one command name php artisan make:auth. This command will create some default views blade, controllers and routes. that is help to login and register a users.

Laravel Tutorial for Beginners Step by Step


  • First Install Laravel Fresh Project
  • Configuration changes in .env file
  • Generate Laravel Application Key
  • Database Migration
  • Create a Login Authentication  Laravel
  • Now Run the created  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 blog

Note : In this command, Blog is the project folder name

If 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 credentials like database name, database user name, database 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.

first install laravel 6 UI in your project using the below command:

composer require laravel/ui

Second use the below command for creating login, registration, forget password and reset password blade files:

php artisan ui bootstrap --auth

6. Now run the created 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/login

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

URL  : http://localhost/blog/public/

7. Conclusion

We have successfully install laravel 6 fresh new application with configuaration. Now the end of laravel tutorial for beginners step by step guide to building your first laravel login authentication and register  laravel 6 application.

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

Comments are closed.