Skip to content

Commit

Permalink
Add method to set parent column name
Browse files Browse the repository at this point in the history
Parent column name can be set if using a custom name for id column.
  • Loading branch information
hsharghi authored and sdebacker committed May 17, 2024
1 parent 381b049 commit 2fcbd11
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/NestableCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ public function __construct(array $items = [])
$this->total = count($items);
}

public function parentColumn($name)
{
$this->parentColumn = $name;

return $this;
}

public function childrenName(string $name): self
{
$this->childrenName = $name;
Expand Down

0 comments on commit 2fcbd11

Please sign in to comment.