Build a Simple Laravel App with Authentication

Laravel 9 Login Registration | Laravel 9 Auth

Laravel 9 Login Registration | Laravel 9 Auth

In this post we will give you Laravel 9 Login Registration | Laravel 9 Auth, hear for Laravel 9 Login Registration | Laravel 9 Auth we will give you details about it.

Laravel team released the latest version last week which is Laravel 9, and as expected, there is some difference between the previous Laravel 7 and this present version. Some of the difference is highlighted in my previous post on how to create a CRUD application with, Laravel 9, it is a step by step guide in creating a CRUD Project Management app.

Previously, in Laravel 7 and Laravel 6 in other to do user authentication, we use an artisan command composer require laravel/ui while from Laravel 5.9 downwards uses php artisan make:auth

In Laravel 9, there is a major change in that area in the sense that many things are introduced and a lot of configurations have been done to get you started and not minding the boilerplate of your application, one of those changes is the introduction of Jetstream, Laravel Jetstream is a beautifully designed application scaffolding for Laravel. A major shift from the legacy authentication UI of Laravel.

Click on my profile to follow me to get more updates.

Without saying much, let’s dive into the new features of Laravel 9.

Step 1: Install a new Laravel app

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

The command above only install Laravel, however, if you want to install Jetstream together then either

Laravel new projectapp --jet


composer require laravel/jetstream

we are going with the first of only installing Laravel, I want to explain other things in the process.

I highlighted some changes noticed in the installation of Laravel 9 from the previous Laravel versions, you can check them out in my previous post Laravel 9 CRUD.

Step 2: Database Setup

Open the .env file on your IDE or text editor

.env file

Change the DB_DATABASE to the name of your database and if you have set a Username and password for your phpmyadmin, specify it, otherwise, leave the username as root and password blank.
Before we migrate, let’s catch one bug before it throws an error, go to App/Providers/AppServiceProvider.php and add


to the boot function, also add

use Illuminate\Support\Facades\Schema;

to the top

AppServiceProvider file

Step 3: Migration

php artisan migrate

migration file

Step 4: install Jetstream

composer require laravel/jetstream

Installing Jetstream

ard route will also be generated for post-login requests. So an application that has some of those, might throw some conflicts.

Step 5: Install livewire or inertia

We need to install one of the stacks, either a livewire or an inertia stack, in this tutorial, I will only be using livewire because it set up everything I need for the app

php artisan jetstream:install livewire

Installing Livewire

As suggested, run npm install && npm run dev to build all the javaScript files and CSS we need for our app. On successful build, Laravel will send a notification at the bottom left.

Laravel Notification

Step 5: Migrate the new table that is created

php artisan migrate

migration Command

Let’s run our app

php artisan serve

Running our app

Holding down the Ctrl button and Clicking the localhost will serve our app in our default browser

Hope this code and post will helped you for implement Laravel 9 Login Registration | Laravel 9 Auth. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs