Add a basic where clause to the model.

@param  string|array|\Closure $column
@param  mixed $value
@return $this
7270
protected function modelWhere($column, $value = null)
    {
        $this->model = $this->model->where($column, $value);
        return $this;
    }
386594
public function deleteWhere($column, $value)
    {
        $query = $this->createQueryBuilder();

        $query->where($column, $value);
        $query->delete();
    }
952615
public function where($column, $operator = null, $value = null, $boolean = 'and') {
        // If the column is an array, we will assume it is an array of key-value pairs
        // and can add them each as a where clause. We will maintain the boolean we
        // received when the method was called and pass it into the nested where.
        if (is_array($column)) {
            return $this->whereNested(function ($query) use ($column) {
                        foreach ($column as $key => $value) {
                            $query->where($key, '=', $value);
                        }
                    }, $boolean);
        }

        // Here we will make some assumptions about the operator. If only 2 values are
        // passed to the method, we will assume that the operator is an equals sign
        // and keep going. Otherwise, we'll require the operator to be passed in.
        if (func_num_args() == 2) {
            list($value, $operator) = [$operator, '='];
        } elseif ($this->invalidOperatorAndValue($operator, $value)) {
            throw new InvalidArgumentException('Illegal operator and value combination.');
        }

        // If the columns is actually a Closure instance, we will assume the developer
        // wants to begin a nested where statement which is wrapped in parenthesis.
        // We'll add that Closure to the query then return back out immediately.
        if ($column instanceof Closure) {
            return $this->whereNested($column, $boolean);
        }

        // If the given operator is not found in the list of valid operators we will
        // assume that the developer is just short-cutting the '=' operators and
        // we will set the operators to '=' and set the values appropriately.
        if (!in_array(strtolower($operator), $this->operators, true)) {
            list($value, $operator) = [$operator, '='];
        }

        // If the value is a Closure, it means the developer is performing an entire
        // sub-select within the query and we will need to compile the sub-select
        // within the where clause to get the appropriate query record results.
        if ($value instanceof Closure) {
            return $this->whereSub($column, $operator, $value, $boolean);
        }

        // If the value is "null", we will just assume the developer wants to add a
        // where null clause to the query. So, we will allow a short-cut here to
        // that method for convenience so the developer doesn't have to check.
        if (is_null($value)) {
            return $this->whereNull($column, $boolean, $operator != '=');
        }

        // Now that we are working with just a simple query we can put the elements
        // in our array and add the query binding to our array of bindings that
        // will be bound to each SQL statements when it is finally executed.
        $type = 'Basic';

        $this->wheres[] = compact('type', 'column', 'operator', 'value', 'boolean');

        if (!$value instanceof Expression) {
            $this->addBinding($value, 'where');
        }

        return $this;
    }
639672
public function and_having($column, $op = null, $value = null)
	{
		if($column instanceof \Closure)
		{
			$this->and_having_open();
			$column($this);
			$this->and_having_close();
			return $this;
		}

		if(func_num_args() === 2)
		{
			$value = $op;
			$op = '=';
		}

		$this->_having[] = array('AND' => array($column, $op, $value));

		return $this;
	}
704177
public function orWhereDate($column, $operator, $value = null)
    {
        $this->wConditions()->orDate(...func_get_args());

        return $this;
    }
999305
public function orWhereLike($column, $value)
    {
        try {
            if (!is_null($this->query)) {
                $this->query .= ' OR '.$column. ' LIKE "'.$value.'"';
                return $this;
            }

        } catch (\Exception $exception) {
            var_dump($exception->getMessage());
        }
    }
1227395
public function where($column, $value, $operator = '=', $table = null)
    {
        $table = $table? $table : $this->table;
        $this->wheres[] = [
            'table' => $table,
            'column' => $column,
            'value' => $value,
            'operator' => $operator
        ];
        return $this;
    }
902478
public function or_where($column, $op = null, $value = null)
	{
		if($column instanceof \Closure)
		{
			$this->or_where_open();
			$column($this);
			$this->or_where_close();
			return $this;
		}

		if (is_array($column))
		{
			foreach ($column as $key => $val)
			{
				if (is_array($val))
				{
					$this->or_where($val[0], $val[1], $val[2]);
				}
				else
				{
					$this->or_where($key, '=', $val);
				}
			}
		}
		else
		{
			if(func_num_args() === 2)
			{
				$value = $op;
				$op = '=';
			}
			$this->_where[] = array('OR' => array($column, $op, $value));
		}
		return $this;
	}
464089
public function where($column, $operator, $value = null)
    {
        $instance = $this->whereStrategyInstance();

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

        return $instance;
    }
871335
public function whereIn($column, $values, $boolean = 'and', $not = false)
	{
		$type = $not ? 'NotIn' : 'In';

		// If the value of the where in clause is actually a Closure, we will assume that
		// the developer is using a full sub-select for this "in" statement, and will
		// execute those Closures, then we can re-construct the entire sub-selects.
		if ($values instanceof Closure)
		{
			return $this->whereInSub($column, $values, $boolean, $not);
		}

		$this->wheres[] = compact('type', 'column', 'values', 'boolean');

		$this->addBinding($values, 'where');

		return $this;
	}
421549
public function having($column, Closure $value = null): self
    {
        return $this->addCondition($column, $value, 'AND');
    }
1370831
public function set(string $column, string $value)
    {
        $this->addSet($this->dialect()->quoteName($column) . ' = ?', [$value]);

        return $this;
    }
949847
public function _and($column, $value = null) {
        if (!is_array($column)) {
            $column = array($column => $value);
        }

        $this->query['where'][count($this->query['where']) - 1] = array_merge(
            $this->query['where'][count($this->query['where']) - 1],
            $column
        );

        return $this;
    }
112668
public function orWhere($column, $relation, $value, $link = false)
    {
        if (!$link) {
            $this->where .= " or ( $column $relation '$value' )";
        } else {
            $this->where .= " or ( $column $relation $value )";
        }

        //
        return $this;
    }
1221359
public function andWhere($column, $op = null, $value = null)
    {
        $this->parseWhereMethod($column, $op, $value, 'andWhere');

        return $this;
    }
433870
public function orHaving($column, Closure $value = null): self
    {
        $this->getHavingStatement()->orHaving($column, $value);
        return $this;
    }
145775
public function where( $column, $operator = null, $value = null, $boolean = 'and' )
	{
		if ( $column instanceof Closure )
		{
			$query = $this->model->newQueryWithoutScopes();
			call_user_func( $column, $query );
			$this->query->addNestedWhereQuery( $query->getQuery(), $boolean );
		}
		else
			call_user_func_array( [$this->query, 'where'], func_get_args() );

		return $this;
	}