Commit 3ec05659 authored by David Frank's avatar David Frank

bugfix: fix issue with push and pull returning the builder incorrectly

parent ad2e69b1
<?php namespace Jenssegers\Eloquent;
class Builder extends \Illuminate\Database\Eloquent\Builder {
/**
* The methods that should be returned from query builder.
*
* @var array
*/
protected $passthru = array(
'toSql', 'lists', 'insert', 'insertGetId', 'pluck',
'count', 'min', 'max', 'avg', 'sum', 'exists', 'push', 'pull'
);
}
\ No newline at end of file
......@@ -176,4 +176,15 @@ abstract class Model extends \Illuminate\Database\Eloquent\Model {
return parent::newBaseQueryBuilder();
}
/**
* Create a new Eloquent query builder for the model.
*
* @param \Jenssegers\Mongodb\Query\Builder $query
* @return \Jenssegers\Mongodb\Eloquent\Builder|static
*/
public function newEloquentBuilder($query)
{
return new Builder($query);
}
}
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