public function whereBetween($column, array $values, $boolean = 'and', $not = false) { $type = 'between'; $this->wheres[] = compact('column', 'type', 'boolean', 'not'); $this->addBinding($values, 'where'); return $this; }
/** * between, 两端开区间 * @param $attribute * @param null $min * @param null $max * @return static */ public function whereBetween($attribute, $min, $max) { if ($min > $max) { return $this->whereEquals(0, 1); } $this->original->whereBetween($attribute, [$min, $max]); return $this; }