Ejemplo n.º 1
0
 public function check($time, $airport, $day)
 {
     $this->setTime($time);
     $this->setAirport($airport);
     $this->getTimeRange();
     $count = FlightDay::whereRaw("(`arrival_time` <= ?\n            and `arrival_time` >= ?\n            and `arrival_airport_id` = ? and `day` = ?)\n            or (`departure_time` <= ?\n            and `departure_time` >= ?\n            and `departure_airport_id` = ? and `day` = ?) ", [$this->maxtime, $this->mintime, $airport, $day, $this->maxtime, $this->mintime, $airport, $day])->count();
     return $count;
 }