public static function getBatchDropoutsDepartment($batch, $departmentid) { $batchEnd = $batch + 100000; $programids = Studentdropout::getDeptPrograms($departmentid); return Studentdropout::select('studentid')->where('studentid', '>=', $batch)->where('studentid', '<', $batchEnd)->whereIn('programid', $programids)->get(); }