Courses

Re-creating Booking.com API with Laravel and PHPUnit

Now imagine the user clicking on the property to choose the apartment. Inside the property view, we need to show the full list of available apartments, with their facilities:

Property show facilities

The Facility model will be a new thing in this lesson.


Goals of This Lesson

  • Build Facility DB/relationship structure
  • Show facilities in the new Show Property endpoint

By the end of this lesson, we will have this list of facilities showing in Postman:

Property show facilities


Facilities: DB Structure

An obvious question: what are those facilities, and what are the different options and categories for them? There could be dozens or even hundreds of various facilities.

I've found the answer to this question while browsing the mobile version of Booking.com, which showed the apartment facilities in a well-structured way:...

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

You also get:

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