Надо так:
$types1=array(1,2); // Тип 1 (номера 1 и 2)
$types2=array(1,3,6); //Тип 2 (номера 1, 3 и 6)
$types3=array(2,5,7); //Тип 3 (номера 2,5 и 7)
$query=DB::table('search')
->where('departure','>',date('Y-m-d H:i:s',strtotime($date_start)))//дата выезда
->where('departure','<',date('Y-m-d H:i:s',strtotime($date_end)+86399))//последний день + 23 часа 59 минут
->where('active',1)//только активные
//далее надо выбрать из указанных типов
->where(function ($q) use ($types1, $types2, $types3) {
$q->where(function ($type1) use ($types1) {
$type1->whereIn('transport',$types1));
})
->orWhere(function ($type2) use ($types2) {
$type2->whereIn('transport',$types2);
})
->orWhere(function ($type3) use ($types3) {
$type3->whereIn('transport',$types3);
});
})
//конец выбора типов
->orderBy('created_at', 'desc')
->paginate(20);
Т.е нужно сгруппировать
where