Courses

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

Ok, after we've covered so much, this will be a very easy and quick one.

We need to have a list of the parking zones/areas, to show them in the application and to allow the user to choose where to start parking.

This will be only one public API endpoint: GET /api/v1/zones

So, let's generate a Controller:

php artisan make:controller Api/V1/ZoneController

Also, we generate the API Resource:

php artisan make:resource ZoneResource

We return only two relevant fields in that API Resource...

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

You also get:

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