Skip to main content

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

Read more here

Create a vehicle

Premium
4 min read

In order to be able to book parking in a specific zone, the user must first add their own vehicles. This lesson will focus on implementing the first CRUD operation.

Add vehicle button

And the form to add a vehicle will look like this. After pressing the Save Vehicle button form is submitted to the server and then redirected back to the list. Pressing the Cancel button redirect will discard the form data without submitting it and will redirect back to the list.

Add vehicle form

  1. Create a new src/hooks/useVehicle.jsx hook...

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

J
jwinder ✓ Link copied!

Either its me or did the description field forgot to be added from the Laravel API Lesson?

M
Modestas ✓ Link copied!

Hi, not sure I understood what you have in mind here. Can you explain a little bit more?

J
jwinder ✓ Link copied!

Yeah, thank you for answering. In the Laravel API tutorial connected to this lesson, the Vehicle Model didnt include the description field. I tried looking back to see if it was somthing I missed, but I do not believe so.

M
Modestas ✓ Link copied!

Okay, now this makes sense. Will see if we can update this.

Thank you!