Illuminate\Database\Query\Builder::prepareValueAndOperator PHP Method

prepareValueAndOperator() protected method

Prepare the value and operator for a where clause.
protected prepareValueAndOperator ( string $value, string $operator, boolean $useDefault = false ) : array
$value string
$operator string
$useDefault boolean
return array
    protected function prepareValueAndOperator($value, $operator, $useDefault = false)
    {
        if ($useDefault) {
            return [$operator, '='];
        } elseif ($this->invalidOperatorAndValue($operator, $value)) {
            throw new InvalidArgumentException('Illegal operator and value combination.');
        }
        return [$value, $operator];
    }