Laravel 9 React JS Auth Scaffolding Tutorial

By Hardik Savani November 5, 2023 Category : Laravel

In this short tutorial, we will cover a laravel 9 install react. This article goes in detail on laravel 9 react auth scaffolding. I would like to share with you install react js in laravel 9. you will learn laravel 9 authentication scaffolding using react. You just need to some steps to do how to use react in laravel 9.

Laravel giver UI package for the easy step of auth scaffolding. Laravel UI provides simple authentication features including login, registration, password reset, email verification, and password confirmation using bootstrap, react and vue.

In this tutorial, I will give you simple steps of how to install react js and how to create auth scaffolding using react in laravel 9 version.

So, let's follow bellow steps:

Install Laravel 9

First of all, we need to get a fresh Laravel 9 version application using bellow command, So open your terminal OR command prompt and run bellow command:

composer create-project laravel/laravel example-app

Install Laravel UI

Let's run bellow command to install laravel ui package by bellow command:

composer require laravel/ui

Next you have to install laravel ui package command for creating auth scaffolding using react. so let's run bellow command:

php artisan ui react

OR

php artisan ui react --auth

Now let's run bellow command for install npm:

npm install && npm run dev

It will generate CSS and js min files.

Next run migration command:

php artisan migrate

Run Laravel App:

All the required steps have been done, now you have to type the given below command and hit enter to run the Laravel app:

php artisan serve

Now, Go to your web browser, type the given URL and view the app output:

http://localhost:8000/

now you can see layout bellow as here:

Home Page:

Login Page:

Register Page:

Dashboard Page:

You can see bellow screen shot that laravel ui create js and component setup:

I hope it can help you...

Shares