We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6659947 commit f7408ecCopy full SHA for f7408ec
src/PowerJoinClause.php
@@ -283,11 +283,16 @@ public function joinType(string $joinType): self
283
284
public function __call($name, $arguments)
285
{
286
- if (!$this->getModel()) {
+ if (! $this->getModel()) {
287
return;
288
}
289
290
- if ($this->hasLaravelScopeAttribute($name) || method_exists($this->getModel(), 'scope'.ucfirst($name))) {
+ if (method_exists($this->getModel(), 'scope'.ucfirst($name))) {
291
+ $scope = 'scope'.ucfirst($name);
292
+ return $this->getModel()->{$scope}($this, ...$arguments);
293
+ }
294
+
295
+ if ($this->hasLaravelScopeAttribute($name)) {
296
return $this->getModel()->callNamedScope($name, array_merge([$this], $arguments));
297
298
0 commit comments