Merge pull request #217 from codler/patch-4

Fix bug when using raw_where with eloquent
This commit is contained in:
Taylor Otwell 2011-12-27 15:00:39 -08:00
commit b1524e8642
2 changed files with 3 additions and 3 deletions

View File

@ -217,12 +217,12 @@ protected function where_not_null($where)
/** /**
* Compile a raw WHERE clause. * Compile a raw WHERE clause.
* *
* @param string $where * @param array $where
* @return string * @return string
*/ */
protected function where_raw($where) protected function where_raw($where)
{ {
return $where; return $where['sql'];
} }
/** /**

View File

@ -175,7 +175,7 @@ public function reset_where()
*/ */
public function raw_where($where, $bindings = array(), $connector = 'AND') 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); $this->bindings = array_merge($this->bindings, $bindings);