Your Complete Guide to Laravel 7 Authentication

How to use Laravel 7 Auth | Laravel Authentication Example with Bootstrap and Vue dependencies


Laravel 7 Auth | Login Register Reset-Password [ Explained ]
          You are in the right platform if you want to learn How to use Laravel 7 Auth and i will explain you step by step how laravel authentication actually works with database with proper example .

         This tutorial is gonna be super easy because we are going use laravel 7 authentication with some few commands and that's all , You don't need to worry about lot's of thing laravel will takes care everything .

         In this tutorial we will create a demo project and we will use laravel authentication on it with Bootstrap and vue dependencies . We are going to create Laravel Login , Register and Reset Password and much more . So Let's Start.

Table of Content :

  • Install Laravel Project
  • Create Database
  • Install Laravel UI Package
  • Install Vue and Bootstrap Dependencies
  • Command for Scaffolding
  • Migrating Tables
  • Output

Step 1 : Install Laravel Project :

      Use the following command to create a laravel Project :

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

      Let's create a demo project with name " lara-auth "


composer create-project --prefer-dist laravel/laravel lara-auth

Step 2 : Create Database and connect to project :

      Our next step is to create a database so that we can store our login and registration data on that . Let's create a database named " laraauth " .
      To connect your database to your project just go inside your " .env  " file present inside your project and make the following configurations .



DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laraauth  //project-name
DB_USERNAME=root
DB_PASSWORD=

     Now your database is connected to your project successfully

Step 3 : Install Laravel UI  :

     To perform Laravel authentication we need to install Laravel UI Package . Use the following command to install Laravel UI Package .


composer require laravel/ui


Laravel 7 Auth | Login Register Reset-Password [ Explained ]

Step 4 : Install Vue and Bootstrap Dependencies :

          Use the following command to install all dependencies of vue js and bootstrap to make the user interface more beautiful .


php artisan ui vue --auth

Laravel 7 Auth | Login Register Reset-Password [ Explained ]


Step 5 : Scaffolding Our Project :

        Now use the following command to refresh your scaffolding so that the vue and bootstrap dependencies will start to work .


npm install && npm run dev

Laravel 7 Auth | Login Register Reset-Password [ Explained ]

              This command might take some time depending upon your internet speed so just be patient . After successful execution of this command now our Laravel project Authentication in ready But the last thing we need to do is to migrate project , so that laravel will automatically create some required tables to store user information .

Step 6 : Migrate Tables : 

       Just simply run the following command and it will create required tables on your database .


php artisan migrate

Laravel 7 Auth | Login Register Reset-Password [ Explained ]

         After migration command your database look something like this :-

Laravel 7 Auth | Login Register Reset-Password [ Explained ]

Step 7 : Output :

       Visit the url your home page \ home ( E.g, http://localhost/project/laravel/lara-auth/public/home )

Laravel 7 Auth | Login Register Reset-Password [ Explained ]

Laravel 7 Auth | Login Register Reset-Password [ Explained ]

                 I hope you have learned that how laravel login and registration works . You can also use Multi Authentication in laravel . If you want to learn anything new , you need to experiment . Laravel is a vast framework , there are lot's of packages available that makes our work very easy . Finally thank you for giving your precious time to this article .


Hope it helped you 😊

For any query don't hesitate to comment 😊..

Thank you -:)

Also Read :- 

Laravel Pagination

How to Integrate Vue js With Laravel

How to use SweetAlert In Laravel

Laravel DomPDF

Make Covid19 Project ( source code )

Vue JS Monster Game 




Previous Post Next Post

Contact Form