src/Tree/Traits/TreeTrait.php
public function getParent($id)
    {
        $node = $this->getSelf($id);
        if ($node) {
            $parentId = $node->{$this->getTreeNodeParentIdName()};

            return $this->getSelf($parentId);
        }
    }
public function getParent($id)
    {
        $node = $this->getSelf($id);
        if ($node) {
            $parentId = $node->{$this->getTreeNodeParentIdName()};

            return $this->getSelf($parentId);
        }
    }
获取父一级节点.

@param mixed $id

@return mixed