protected function recursiveReorder($root, $parentId, $left)
    {
        $right = $left + 1;
        $children = array_get($root, 'children', []);
        foreach ($children as $child) {
            $right = $this->recursiveReorder($child, $root['id'], $right);
        }
        $this->move($root['id'], $parentId, $left, $right);
        $left = $right + 1;

        return $left;
    }