The following users have thanked you: Eoin
$item = $this->items[$key];
if (!$ordering) {
$this->setGroupToChildren($item);
return;
}
protected function setGroupToChildren($item)
{
$groups = $item->groups();
foreach ($groups as $group => $children) {
foreach ($children as $child) {
$child->group = $group;
$this->setGroupToChildren($child);
}
}
}
The following users have thanked you: Eoin
Time to create page: 0.057 seconds