👉Laravel

Papon Ahasan
3 min readJan 15, 2021

Authentication

Here I want to give you step-by-step instructions on email verification in laravel 6 application.

Step 1: Install Laravel 6

First of all, we need to get a fresh Laravel 6 version application using the below command.

Step 2: Create a Database(Exa: XAMPP)

Step 3: Email Verification Setup

In step, we need to add email verification setup, so basically we have to add email verification class implement in the user model, use middleware for protection.

app/User.php

routes/web.php

app/Http/Controllers/HomeController.php

Step 4: Database Configuration

In this step, we need to add database configuration details on the .env file. So let’s create a username, password, etc. So let’s add.

Step 5: Email Configuration

Here, we need to add email configuration in the .env file. We are sending email after user registration so we need to add email SMTP details for send email

.env

Step 6: Create Auth And Run Project

You have to follow a few steps to make auth in your laravel 6 application. First you need to install laravel/ui package as like bellow:

Now you can use a quick way to create registration, login, and forgot password with routes by auth command, So simply run bellow command to create:

Now you need to run the npm command, otherwise, you can not see the better layout of the login and register page.

Install NPM:

Run NPM:

After added database configuration, you need to run default migration of laravel by the following command:

Now you are ready to run your laravel 6 app. So let’s check by the following command:

--

--