Where on steroids.

@param string $key
@param mixed $operator
@param null $value
@return static
970929
public function where($key, $operator, $value = null)
    {
        if (func_num_args() == 2) {
            $value = $operator;

            $operator = '=';
        }

        $countries = method_exists($this, 'where'.ucfirst($key))
            ? $this->{'where'.ucfirst($key)}($value)
            : parent::where($key, $operator, $value);

        return $this->hydrateDefaultElements($countries);
    }
123139
public function where($key, $value=null)
    {
        if($value)
            return $this->model->where($key, $value);
        if(is_array($key))
            return $this->model->where($key);
        return null;
    }
430749
public function where($key, $operatorOrValue, $value=null)
    {

        if ($key == 'page_type' && $value === null) {
            return $this->pageType($operatorOrValue);
        }

        if ($this->isPageKey($key)) {
            $this->query->where($key, $operatorOrValue, $value);
            return $this;
        }

        if ($this->isConfigKey($key)) {
            return $this->addConfigWhere($key, $operatorOrValue, $value);
        }

        return $this;

    }
464089
public function where($column, $operator, $value = null)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->where(...func_get_args());

        return $instance;
    }
916399
protected function operatorForWhere($key, $operator, $value)
    {
        return function ($item) use ($key, $operator, $value) {
            $retrieved = data_get($item, $key);

            switch ($operator) {
                default:
                case '=':
                case '==':
                    return $retrieved == $value;
                case '!=':
                case '<>':
                    return $retrieved != $value;
                case '<':
                    return $retrieved < $value;
                case '>':
                    return $retrieved > $value;
                case '<=':
                    return $retrieved <= $value;
                case '>=':
                    return $retrieved >= $value;
                case '===':
                    return $retrieved === $value;
                case '!==':
                    return $retrieved !== $value;
            }
        };
    }
864160
protected function whereHandler($key, $operator = null, $value = null, $joiner = 'AND')
    {
        $key = $this->addTablePrefix($key);
        $this->statements['wheres'][] = compact('key', 'operator', 'value', 'joiner');
        return $this;
    }
392011
public function on($key, $operator, $value, $joiner = 'AND'): self
    {
        $this->statements['criteria'][] = [
            'key'       => $this->addTablePrefix($key),
            'operator'  => $operator,
            'value'     => $this->addTablePrefix($value),
            'joiner'    => $joiner,
            'condition' => 'ON',
        ];

        return $this;
    }
485227
public function create($operator, $value)
    {
        $this->operator = $operator;
        $this->value    = $value;

        return $this;
    }
987049
public function where($name, $operator = "=", $value = NULL)
    {

        if (is_callback_function($name)) {
            $name($this);
            return $this;
        }

        if (!$this->isOperator($operator)) {
            $value = $operator;
            $operator = "=";
        }

        if ($operator == "=") {

            if ($name == "_id") {
                return $this->_id($value);
            }

            $this->filter[] = ["term" => [$name => $value]];
        }

        if ($operator == ">") {
            $this->filter[] = ["range" => [$name => ["gt" => $value]]];
        }

        if ($operator == ">=") {
            $this->filter[] = ["range" => [$name => ["gte" => $value]]];
        }

        if ($operator == "<") {
            $this->filter[] = ["range" => [$name => ["lt" => $value]]];
        }

        if ($operator == "<=") {
            $this->filter[] = ["range" => [$name => ["lte" => $value]]];
        }

        if ($operator == "like") {
            $this->must[] = ["match" => [$name => $value]];
        }

        if ($operator == "exists") {
            $this->whereExists($name, $value);
        }

        return $this;
    }
1018508
public function partition($key, $operator = null, $value = null)
    {
        $partitions = [new static, new static];

        $callback = func_num_args() === 1
                ? $this->valueRetriever($key)
                : $this->operatorForWhere(...func_get_args());

        foreach ($this->items as $key => $item) {
            $partitions[(int) ! $callback($item, $key)][$key] = $item;
        }

        return new static($partitions);
    }
1077445
public function orWhere($key = null, $condition = null, $value = null)
    {
        if (!is_null($condition) && is_null($value)) {
            $value = $condition;
            $condition = '=';
        }

        array_push($this->_conditions, []);

        return $this->makeWhere($key, $condition, $value);
    }
1181328
public function where($field, $operator = null, $value = null)
    {
        return $this->andWhere($field, $operator, $value);
    }
718286
protected function operatorForWhere($key, $operator, $value)
    {
        return function ($obj) use ($key, $operator, $value) {
            $retrieved = $obj[$key];

            switch ($operator) {
                default:
                case '=':
                case '==':
                    return $retrieved == $value;
                case '!=':
                case '<>':
                    return $retrieved != $value;
                case '<':
                    return $retrieved < $value;
                case '>':
                    return $retrieved > $value;
                case '<=':
                    return $retrieved <= $value;
                case '>=':
                    return $retrieved >= $value;
                case '===':
                    return $retrieved === $value;
                case '!==':
                    return $retrieved !== $value;
            }
        };
    }
1165105
public function orWhere($field, $operator = null, $value = null)
    {
        $this->addOrWhere($field, $operator, $value);

        return $this;
    }
884235
public function operator($operator, $value)
    {
        $this->wrapEqualityCriteria();

        if ($this->currentField) {
            $this->query[$this->currentField][$operator] = $value;
        } else {
            $this->query[$operator] = $value;
        }
        return $this;
    }
78031
public function orWhere($key, $operator, $value)
    {
        $this->where[] = 'OR '.$key.' '.$operator.' '.'?';
        $this->bindings[] = $value;

        return $this;
    }
506628
public function where($key, $value)
    {
        $filter = $this->createFilter($key, $value);
        return new static(array_filter($this->source, $filter));
    }