Commit b1524e86 authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #217 from codler/patch-4

Fix bug when using raw_where with eloquent
parents 0302b9c3 4b3965e4
......@@ -217,12 +217,12 @@ class Grammar {
/**
* Compile a raw WHERE clause.
*
* @param string $where
* @param array $where
* @return string
*/
protected function where_raw($where)
{
return $where;
return $where['sql'];
}
/**
......
......@@ -175,7 +175,7 @@ class Query {
*/
public function raw_where($where, $bindings = array(), $connector = 'AND')
{
$this->wheres[] = array('type' => 'raw', 'connector' => $connector, 'sql' => $where);
$this->wheres[] = array('type' => 'where_raw', 'connector' => $connector, 'sql' => $where);
$this->bindings = array_merge($this->bindings, $bindings);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment