Laravel Jetstream Customize Login with Username or Email Tutorial

In this tutorial you will learn about the Laravel Jetstream Customize Login with Username or Email Tutorial and its application with practical example.

In this Laravel Jetstream Customize Login with Username or Email Tutorial I will show how to Customize Login with Username or Email in laravel. In this laravel 8 jetstream Customize Login with Username or Email tutorial I will show you to change login with email to username or login with username to email using jetstream auth in laravel application. Jetstream auth with livewire is laravel package that enable us to generate default laravel authentication scaffolding. Laravel jetstream auth includes fully functional login, register, logout, reset password, forget password, email verification, two-factor authentication, session management. Jetstream auth will include login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel Jetstream Customize Login with Username or Email Tutorial

In this step by step tutorial I will guide through on how to Customize Login with Username or Email. You will learn to change login with email to username or login with username to email using jetstream auth in laravel application. Please follow the instruction given below:

  • Step 1 – Install Laravel 8 App
  • Step 2 – Database Configuration
  • Step 3 – Install Auth Scaffolding Jetstream
  • Step 4 – Install Livewire Package
  • Step 5 – Jetstream Configuration and Customization
  • Step 6 – Run PHP artisan Migrate
  • Step 7 – Install Npm Packages
  • Step 8 – Run Development Server

Step 1 – Install Laravel 8 App

First of all we need to create a fresh laravel project, download and install Laravel 8 using the below command

Step 2 – Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Step 3 – Install Auth Scaffolding Jetstream

In this step, we will install Jetstream Package via the composer dependency manager. Use the following command to install Jetstream.

Step 4 – Install Livewire Package

Now run following command to create basic authentication scaffolding login, register, logout and email verification views file:

Step 5 – Jetstream Configuration and Customization

Next, we will open fortify.php file and will enable and disable option of jetstream package as per requirement, which is located inside config directory.

And replace the following lines of code into fortify.php file:

After installing laravel jetstream successfully. Now, you need to do following changes on that FortifyServiceProvider.php, So visit app/Providers directory and open FortifyServiceProvider.php file then add the following code into it:


Then open login.blade.php file, which is placed resources/views/auth/ directory and add the following code into it:

Step 6 – Run php artisan Migrate

Now, run following command to migrate database schema.

Step 7 – Install Npm Packages

Now run following command to instal npm dependencies:

Then type the following command on cmd to run npm:

Step 8 – Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

In this tutorial we have learn about the Laravel Jetstream Customize Login with Username or Email Tutorial and its application with practical example. I hope you will like this tutorial.