src/Franzose/ClosureTable/Models/Entity.php
public function countChildren()
    {
        if ($this->hasChildrenRelation()) {
            $result = $this->getRelation($this->getChildrenRelationIndex())->count();
        } else {
            $result = $this->queryByParentId()->count();
        }

        return $result;
    }
public function countChildren()
    {
        if ($this->hasChildrenRelation()) {
            $result = $this->getRelation($this->getChildrenRelationIndex())->count();
        } else {
            $result = $this->queryByParentId()->count();
        }

        return $result;
    }
public function countChildren ( ) { if ( $ this -> hasChildrenRelation ( ) ) { $ result = $ this -> getRelation ( $ this -> getChildrenRelationIndex ( ) ) -> count ( ) ; } else { $ result = $ this -> queryByParentId ( ) -> count ( ) ; } return $ result ; }
Returns a number of model's children.

@return int
Returns a number of model s children .