We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 887045b commit 56126cfCopy full SHA for 56126cf
src/Illuminate/Database/Eloquent/Builder.php
@@ -889,7 +889,11 @@ public function applyScopes()
889
890
$builder = clone $this;
891
892
- foreach ($this->scopes as $scope) {
+ foreach ($this->scopes as $identifier => $scope) {
893
+ if (! isset($builder->scopes[$identifier])) {
894
+ continue;
895
+ }
896
+
897
$builder->callScope(function (Builder $builder) use ($scope) {
898
// If the scope is a Closure we will just go ahead and call the scope with the
899
// builder instance. The "callScope" method will properly group the clauses
0 commit comments