Baum\Node::ancestorsAndSelf PHP Method

ancestorsAndSelf() public method

Instance scope which targes all the ancestor chain nodes including the current one.
public ancestorsAndSelf ( ) : Builder
return Illuminate\Database\Eloquent\Builder
    public function ancestorsAndSelf()
    {
        return $this->newNestedSetQuery()->where($this->getLeftColumnName(), '<=', $this->getLeft())->where($this->getRightColumnName(), '>=', $this->getRight());
    }