Courses

Re-creating Booking.com API with Laravel and PHPUnit

Now, let's try to show the property and apartment information in the search results, similarly to how it's done on the Booking.com website:

Booking search results apartments

As you can see, every apartment may have its type, size in square meters, number of small/large/sofa beds, and number of bedrooms, living rooms, and bathrooms. So let's return all of that.


Goals of This Lesson

  • Create DB structure for Apartment Type and size
  • Create DB structure for Rooms and Beds with Bed Types
  • Showing Rooms and Beds in Search Results
  • Look at a different project scenario: doctors/patients

By the end of this lesson, we will have this DB structure:

DB Structure with Beds


DB Structure: Apartment Type and Size

Let's add two fields to the apartments: their type and size (in square meters).

Types should have a separate DB table, with a relationship, so we do exactly that...

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