Skip to content

Commit 3bd57e8

Browse files
committed
make append option actually do something
1 parent 70686da commit 3bd57e8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/SelectTree.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,14 @@ public function storeResults(bool $storeResults = true): static
437437

438438
public function getTree(): Collection|array
439439
{
440-
return $this->evaluate($this->buildTree()->when($this->prepend,
441-
fn (Collection $tree) => $tree->prepend($this->evaluate($this->prepend))));
440+
return $this->evaluate($this->buildTree()
441+
->when($this->prepend,
442+
fn (Collection $tree) => $tree->prepend($this->evaluate($this->prepend))
443+
)
444+
->when($this->append,
445+
fn(Collection $tree) => $tree->push($this->evaluate($this->append))
446+
)
447+
);
442448
}
443449

444450
public function getResults(): Collection|array|null

0 commit comments

Comments
 (0)