Commit 92c7876f authored by Damian Gręda's avatar Damian Gręda

MongoCursorException: Invalid modifier specified: ; Fixes: #87

parent 6002aca0
......@@ -394,10 +394,12 @@ class Builder extends \Illuminate\Database\Query\Builder {
public function increment($column, $amount = 1, array $extra = array())
{
$query = array(
'$inc' => array($column => $amount),
'$set' => $extra,
'$inc' => array($column => $amount)
);
if(!empty($extra))
{
$query[] = array('$set' => $extra);
}
// Protect
$this->whereNotNull($column);
......
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