Commit dd899e2c authored by Jens Segers's avatar Jens Segers

Merge pull request #88 from dgreda/master

Please merge this changes for Issue: MongoCursorException: Invalid modifier specified: ; Fixes: #87
parents 6002aca0 19fb328d
......@@ -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['$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