public function __call($method, $parameters)
{
if (isset($this->macros[$method])) {
array_unshift($parameters, $this);
return call_user_func_array($this->macros[$method], $parameters);
}
if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) {
return $this->callScope([$this->model, $scope], $parameters);
}
if (in_array($method, $this->passthru)) {
return call_user_func_array([$this->toBase(), $method], $parameters);
}
call_user_func_array([$this->query, $method], $parameters);
return $this;
}