Commit 82c23baa authored by Jens Segers's avatar Jens Segers

Fix push on model instances

parent ba43ccd2
...@@ -205,6 +205,23 @@ abstract class Model extends \Jenssegers\Eloquent\Model { ...@@ -205,6 +205,23 @@ abstract class Model extends \Jenssegers\Eloquent\Model {
return $query = $this->newQuery()->where($this->getKeyName(), $this->getKey())->unset($columns); return $query = $this->newQuery()->where($this->getKeyName(), $this->getKey())->unset($columns);
} }
/**
* Pass push to the query builder.
*
* @return mixed
*/
public function push()
{
if ($parameters = func_get_args())
{
$query = $this->newQuery();
return call_user_func_array(array($query, 'push'), $parameters);
}
return parent::push();
}
/** /**
* Create a new Eloquent query builder for the model. * Create a new Eloquent query builder for the model.
* *
......
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