есть запрос на mysql
SELECT *
FROM `rooms`
WHERE `hotel_id` = $hotel_id
WHERE `people` = $people
WHERE `id` NOT IN (
SELECT `room_id`
FROM `orders`
WHERE `hotel_id` = $hotel_id
WHERE `date_from` < $date_to AND `date_to` > $date_from
как записать его в ларавел?
пробую так, но какой-то бред
$rooms = DB::table('rooms')
->where('hotel_id','=', $request->hotel_id)
->where('people','=', $request->people)
->whereNotIn('id',DB::raw('SELECT `room_id`
FROM `orders`
WHERE `hotel_id` = '.$request->hotel_id.'
WHERE `date_from` < '.$to.' AND `date_to` > '.$from.''))
->orderBy('rooms.id', 'asc')->get();