Хабр Курсы для всех
РЕКЛАМА
Большая витрина: от крупнейших школ до частных авторов. Сравнивайте по цене, длительности, формату и выбирайте самый подходящий курс!
$router->get('catalog/{path}', ...)
$router->get('{path}', ...)
$descendants->push($this)->linkNodes()->pop();parent category (parent-category)
----child (parent-category-child)
--------descendant (parent-category-child-descendant)
parent cat (parent-cat)
----child (parent-cat-child)
--------descendant (parent-category-child-descendant) // не правильное значение
parent (parent)
----child (parent-child)
--------descendant (parent-cat-child-descendant) // не правильное значение
// Получаем всех потомков в древовидном порядке
$descendants = $this->descendants()->defaultOrder()->get();
// Данный метод заполняет отношения parent и children
$descendants->push($this)->linkNodes()->pop(); // Но сбиваем порядок! Надо убрать.
Дерево разделов неограниченной вложенности и URL