diff --git a/src/Query.php b/src/Query.php index 67a5ecf..d15541c 100755 --- a/src/Query.php +++ b/src/Query.php @@ -229,6 +229,12 @@ public function __call(string $method, array $parameters): self return $this->callNamedScope($method, $parameters); } + if (!method_exists($this->getModel(), $method)) { + throw new BadMethodCallException( + "Method {$method} does not exist." + ); + } + return $this->forwardCallTo( $this->getModel(), $method,