Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Register implementation

Premium
8 min read

In this lesson, we will implement form functionality to make a request to the server, and if the request was successful (the user was registered) redirect to the vehicles list page.

Register success

Register redirect

  1. First create a new src/views/vehicles/VehiclesList.jsx view for our future list. This is the page where the user will be redirected after registration...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 14 min)

You also get:

54 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

IP
Ivan Pellegatta ✓ Link copied!

Hello, I have this error when try to send the form:

xhr.js:247 POST http://localhost:5174/api/V1/auth/register 404 (Not Found)

PK
Povilas Korop ✓ Link copied!
  1. In your .env file, do you have APP_URL=http://localhost:5174?
  2. In your RouteServiceProvider, did you specify V1 prefix?
  3. Don't remember exactly but shouldn't V1 be lowercase v1?
P
porrapat ✓ Link copied!

This should come from Backend (Laravel) I think. For localhost:5174 it is from frontend React(Vite).

You must find car-parking app api laravel then You should built it. Maybe url should be

http://127.0.0.1:8000/api/V1/auth/register instead.

For http://parkingapi.test/api/v1/auth/register it is just a dummy one.

J
Joffrey ✓ Link copied!

In case you're stuck with the API, you have to git clone this project: https://github.com/LaravelDaily/Laravel-API-Parking-Demo.git. Then, install it as a regular Laravel app (composer install, npm install, artisan migrate, artisan key:generate), run it with Valet (careful of the app directory's name to match API url) / Docker and you're good to go!