where([ 'game_code' => $gametype, 'match_id' => $matchid, 'bet_type' => $bettype ])->get(); } else { if ($bettype == 1) { $his = $this->where([ 'game_code' => $gametype, 'match_id' => $matchid, 'bet_type' => $bettype ])->whereIn('order_id', $order_idsArr)->get(); } else { $his = $this->where([ 'game_code' => $gametype, 'bet_type' => $bettype ])->whereIn('order_id', $order_idsArr)->get(); } } if (count($his) > 0) { foreach ($his as $val) { $ret[$val->order_id] = $val; } } return $ret; } }