Courses

Build Laravel API for Car Parking App: Step-By-Step

At a first glance, it's simple: another CRUD-like resource for Parking, and we're done? But here's where you have a lot of room to choose from, how to structure the API endpoints and Controller methods.

  • Should it be /parkings/start and /parkings/stop?
  • Should it be POST /parkings and PUT /parkings?
  • Some other structure?

I posted this question on Twitter - you can read the replies or watch my re-cap on YouTube: To CRUD or Not To CRUD?.

In short, there are at least a few ways to structure this. I would go for a non-standard-CRUD approach and create a ParkingController with start/stop methods.

This lesson is only for Premium Members.
Want to access all lessons of this course?

You also get:

  • 66 courses (1167 lessons, 43 h 18 min total)
  • Premium tutorials
  • Access to repositories
  • Private Discord