Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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