src/Franzose/ClosureTable/Models/Entity.php
public function getChildAt($position, array $columns = ['*'])
    {
        if ($this->hasChildrenRelation()) {
            $result = $this->getRelation($this->getChildrenRelationIndex())->get($position);
        } else {
            $result = $this->children($position)->first($columns);
        }

        return $result;
    }
public function getChildAt($position, array $columns = ['*'])
    {
        if ($this->hasChildrenRelation()) {
            $result = $this->getRelation($this->getChildrenRelationIndex())->get($position);
        } else {
            $result = $this->children($position)->first($columns);
        }

        return $result;
    }
public function getChildAt ( $ position , array $ columns = [ '*' ] ) { if ( $ this -> hasChildrenRelation ( ) ) { $ result = $ this -> getRelation ( $ this -> getChildrenRelationIndex ( ) ) -> get ( $ position ) ; } else { $ result = $ this -> children ( $ position ) -> first ( $ columns ) ; } return $ result ; }
Retrieves a child with given position.

@param $position
@param array $columns
@return Entity
Retrieves a child with given position .