Skip to content

Commit 82c23ba

Browse files
committed
Fix push on model instances
1 parent ba43ccd commit 82c23ba

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Jenssegers/Mongodb/Model.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,23 @@ public function dropColumn($columns)
205205
return $query = $this->newQuery()->where($this->getKeyName(), $this->getKey())->unset($columns);
206206
}
207207

208+
/**
209+
* Pass push to the query builder.
210+
*
211+
* @return mixed
212+
*/
213+
public function push()
214+
{
215+
if ($parameters = func_get_args())
216+
{
217+
$query = $this->newQuery();
218+
219+
return call_user_func_array(array($query, 'push'), $parameters);
220+
}
221+
222+
return parent::push();
223+
}
224+
208225
/**
209226
* Create a new Eloquent query builder for the model.
210227
*

0 commit comments

Comments
 (0)