src/Leevel/Database/Condition.php
protected function callWhereSugar(string $method, array $args)
    {
        if (!in_array($method, [
            'whereNotBetween', 'whereBetween',
            'whereNotNull', 'whereNull',
            'whereNotIn', 'whereIn',
            'whereNotLike', 'whereLike',
            'whereDate', 'whereDay',
            'whereMonth', 'whereYear',
        ], true)) {
            return false;
        }

        if ($this->checkFlowControl()) {
            return $this;
        }

        if (in_array($method, ['whereDate', 'whereDay', 'whereMonth', 'whereYear'], true)) {
            $this->setInTimeCondition(strtolower(substr($method, 5)));
            $this->where(...$args);
            $this->setInTimeCondition(null);

            return $this;
        }

        $this->setTypeAndLogic('where', static::LOGIC_AND);

        if (0 === strpos($method, 'whereNot')) {
            $type = 'not '.strtolower(substr($method, 8));
        } else {
            $type = strtolower(substr($method, 5));
        }

        array_unshift($args, $type);

        return $this->aliasCondition(...$args);
    }
protected function callWhereSugar(string $method, array $args)
    {
        if (!in_array($method, [
            'whereNotBetween', 'whereBetween',
            'whereNotNull', 'whereNull',
            'whereNotIn', 'whereIn',
            'whereNotLike', 'whereLike',
            'whereDate', 'whereDay',
            'whereMonth', 'whereYear',
        ], true)) {
            return false;
        }

        if ($this->checkFlowControl()) {
            return $this;
        }

        if (in_array($method, ['whereDate', 'whereDay', 'whereMonth', 'whereYear'], true)) {
            $this->setInTimeCondition(strtolower(substr($method, 5)));
            $this->where(...$args);
            $this->setInTimeCondition(null);

            return $this;
        }

        $this->setTypeAndLogic('where', static::LOGIC_AND);

        if (0 === strpos($method, 'whereNot')) {
            $type = 'not '.strtolower(substr($method, 8));
        } else {
            $type = strtolower(substr($method, 5));
        }

        array_unshift($args, $type);

        return $this->aliasCondition(...$args);
    }
调用 where 语法糖.

@param string $method
@param array  $args

@return $this|false