Skip to content

Commit

Permalink
https://github.com/lazychaser/laravel-nestedset/pull/552
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Apr 10, 2022
1 parent f47602e commit ec8e1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BaseRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function addEagerConstraints(array $models)
// The first model in the array is always the parent, so add the scope constraints based on that model.
// @link https://github.com/laravel/framework/pull/25240
// @link https://github.com/lazychaser/laravel-nestedset/issues/351
optional($models[0])->applyNestedSetScope($this->query);
optional(reset($models))->applyNestedSetScope($this->query);

$this->query->whereNested(function (Builder $inner) use ($models) {
// We will use this query in order to apply constraints to the
Expand Down

0 comments on commit ec8e1d7

Please sign in to comment.