Skip to content

Commit

Permalink
pass all arguments to query scope method
Browse files Browse the repository at this point in the history
  • Loading branch information
aaemnnosttv committed Feb 24, 2018
1 parent f487d33 commit 8685f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Query/Builder.php
Expand Up @@ -94,7 +94,7 @@ public function getModel()
public function __call($name, $arguments)
{
if (method_exists($this->model, 'scope' . ucfirst($name))) {
return $this->model->{'scope' . ucfirst($name)}($this);
return $this->model->{'scope' . ucfirst($name)}($this, ...$arguments);
}

throw new \BadMethodCallException("No '$name' method exists on " . static::class);
Expand Down

0 comments on commit 8685f2a

Please sign in to comment.