Baum\Node::leaves PHP Method

leaves() public method

Instance scope targeting all of its nested children which do not have children.
public leaves ( ) : Builder
return Illuminate\Database\Query\Builder
    public function leaves()
    {
        $grammar = $this->getConnection()->getQueryGrammar();
        $rgtCol = $grammar->wrap($this->getQualifiedRightColumnName());
        $lftCol = $grammar->wrap($this->getQualifiedLeftColumnName());
        return $this->descendants()->whereRaw($rgtCol . ' - ' . $lftCol . ' = 1');
    }