public function parent()
    {
        return $this->filter([
            'lft__lt' => $this->getModel()->lft,
            'rgt__gt' => $this->getModel()->rgt,
            'level' => $this->getModel()->level - 1,
            'root' => $this->getModel()->root,
        ]);
    }
public function parent()
    {
        return $this->filter([
            'lft__lt' => $this->getModel()->lft,
            'rgt__gt' => $this->getModel()->rgt,
            'level' => $this->getModel()->level - 1,
            'root' => $this->getModel()->root,
        ]);
    }
public function parent ( ) { return $ this -> filter ( [ 'lft__lt' => $ this -> getModel ( ) -> lft , 'rgt__gt' => $ this -> getModel ( ) -> rgt , 'level' => $ this -> getModel ( ) -> level - 1 , 'root' => $ this -> getModel ( ) -> root , ] ) ; }
Named scope. Gets parent of node.

@return QuerySet
Named scope . Gets parent of node .