Now, let's move to the detailed view of the specific Apartment which would show facilities grouped by category.
This will be a bit shorter lesson compared to others.
Goals of This Lesson
- New endpoint to Show Apartment
- Grouping the facility data
- PHPUnit test for it
By the end of this lesson, we will have this in Postman:

New Endpoint: Show Apartment
Again, from the previous lesson, here's how the apartment detail facilities screen looks on mobile:...
I think there is this not right syntax in ApartmentShowTest This line:
This is right syntax one is:
see more in Laravel documentation: https://laravel.com/docs/10.x/http-tests#assert-json-fragment
Hmmm, could it be that BOTH can work? Cause the test passed successfully.
Maybe, But the function assertJsonFragment accepts one argument (array $data)