/** * Add a basic where clause to the query. * * @param string $column * @param string $operator * @param mixed $value * @param string $boolean * @return $this */ 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(array($this->query, 'where'), func_get_args()); } return $this; }
/** * Wrap the given value with the parent query's grammar. * * @param string $value * @return string */ public function wrap($value) { return $this->parent->newQueryWithoutScopes()->getQuery()->getGrammar()->wrap($value); }