Laravel 8 Login and Registration System Tutorial | User Authentication

Laravel 8 authentication tutorial | Login and Register in Laravel 8

In this article, you will be learning how to make login and registration system in laravel 8 by artisan command.

Step 1: Let's install Laravel 8 as we have seen how to install laravel 8 on this link: Click here

Step 2: Let's setup the Laravel File .

1st : (dot) .env file for database connection:


2nd : Go to path : app/Providers/AppServiceProvider.php file and add the below code inside boot function to make all your database schema default string length value to 191 values.

use Illuminate\Support\Facades\Schema;

public function boot()

Step 3: Now lets give the below command to generate the Auth Login and Register system in laravel 8.

First, Install you laravel/ui  as follows:

$ composer require laravel/ui

after successfull installation of laravel/ui.

Install the laravel ui:auth by below command:

$ php artisan ui:auth

Note: (It only installs your Login and Registration System without any 3rd application like Vue, React, or Bootstrap.)

after your ui:auth Authentication Scaffoldings generated successfully, Lets Migrate the table from laravel application to our database by below command:

$ php artisan migrate

after successful migration into our database. lets start to serve the application by following command:

$ php artisan serve

We have successfully done with Login and Registration functionality in Laravel 8.

lets start at http://localhost:8000/login

Step 4: If you had seen your Login and Register FORM it would be without any CSS or Bootstrap design guys so, to solve that you have to add or install Bootstrap in our laravel 8 application guys as shown below:

Open file: resources/views/layouts/app.blade.php file.

add the CSS link in head tag


    <!-- Styles -->
    <link href="" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">


add the SCRIPT links before ending of the BODY tag.

<script src="" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>

Now, the Login and register form is designed successfully using Boostrap 5.

Thanks for reading...