/** * Checks whether or not the specified time is marked as available * * @param $from * @param $to * @return bool */ public function isAvailable($from, $to) { return 0 < timetable_query_a($this->timetable->specifics()->where('is_available', 1), $from, $to); }
/** * Checks whether or not the datetime is currently booked. * * @param $from * @param $to * @return bool */ public function isBooked($from, $to) { return 0 < timetable_query_a($this->timetable->bookings(), $from, $to); }