Skip to content

Commit

Permalink
Fwd unknown calls to query builder
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Feb 9, 2017
1 parent d577faa commit 9bcdb7d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,14 @@ public function with($relations)

return $this;
}

public function __call($name, $arguments)
{
$query = $this->getQuery();
$result = call_user_func_array([$query, $name], $arguments);

if ($query === $result) return $this;

return $result;
}
}

0 comments on commit 9bcdb7d

Please sign in to comment.