Skip to content

Commit 722975e

Browse files
committed
wip
1 parent 6659947 commit 722975e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/PowerJoinClause.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,16 @@ public function joinType(string $joinType): self
283283

284284
public function __call($name, $arguments)
285285
{
286-
if (!$this->getModel()) {
286+
if (! $this->getModel()) {
287287
return;
288288
}
289289

290290
if ($this->hasLaravelScopeAttribute($name) || method_exists($this->getModel(), 'scope'.ucfirst($name))) {
291+
if (method_exists($this->getModel(), 'scope'.ucfirst($name))) {
292+
$scope = 'scope'.ucfirst($name);
293+
return $this->getModel()->{$scope}($this, ...$arguments);
294+
}
295+
291296
return $this->getModel()->callNamedScope($name, array_merge([$this], $arguments));
292297
}
293298

0 commit comments

Comments
 (0)