Skip to content

Commit 2fcbd11

Browse files
hsharghisdebacker
authored andcommitted
Add method to set parent column name
Parent column name can be set if using a custom name for id column.
1 parent 381b049 commit 2fcbd11

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/NestableCollection.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ public function __construct(array $items = [])
3434
$this->total = count($items);
3535
}
3636

37+
public function parentColumn($name)
38+
{
39+
$this->parentColumn = $name;
40+
41+
return $this;
42+
}
43+
3744
public function childrenName(string $name): self
3845
{
3946
$this->childrenName = $name;

0 commit comments

Comments
 (0)