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
2 changed files with 3 additions and 3 deletions

View File

@@ -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'];
}
/**

View File

@@ -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);