Pagination works fine when i search for hotels pages, but when i select to view an hotel with it propre rooms , i get the hotel but the rooms aren't paginated like i got 3 rooms instead of 100{paginated} also no page numbers
What i m doing wrong
the code from controller::
{
$hotel = Hotel::where('slug', $slug)->first();
$hotel_id = $hotel->id;
$rooms = Room::where('hotel_id', $hotel_id)->paginate(3);
return view('hotels.show',['hotel' => $hotel, 'rooms' => $rooms ]);
}
the blade html:
<div> {{ $hotel->title }} </div>
@foreach($rooms as $room)
<div>Room: {{ $room->title }} </div>
@endforeach