Merge pull request #217 from codler/patch-4
Fix bug when using raw_where with eloquent
This commit is contained in:
commit
b1524e8642
|
@ -217,12 +217,12 @@ protected function where_not_null($where)
|
|||
/**
|
||||
* 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 @@ public function reset_where()
|
|||
*/
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue