From 7cb3d7b256dfb27af27b91d48098f19771dc0120 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Sat, 30 Sep 2023 16:01:23 +0200 Subject: [PATCH] Edit comment --- src/SelectTree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SelectTree.php b/src/SelectTree.php index 90febae..12a432f 100644 --- a/src/SelectTree.php +++ b/src/SelectTree.php @@ -87,7 +87,7 @@ private function buildTree(): Collection $nullParentQuery = $this->getRelationship()->getRelated()->query()->where($this->getParentAttribute(), $this->getParentNullValue()); $nonNullParentQuery = $this->getRelationship()->getRelated()->query()->whereNot($this->getParentAttribute(), $this->getParentNullValue()); - // If we're not at the root level and a modification callback is provided, apply it to both queries. + // If we're not at the root level and a modification callback is provided, apply it to null query if ($this->modifyQueryUsing) { $nullParentQuery = $this->evaluate($this->modifyQueryUsing, ['query' => $nullParentQuery]); }