Devise\Menus\MenusRepository::getLazyLoadByDepth PHP Method

getLazyLoadByDepth() private method

generates the lazy load string based off the requested depth
private getLazyLoadByDepth ( $startingRelation, $depth ) : string
$startingRelation
$depth
return string
    private function getLazyLoadByDepth($startingRelation, $depth)
    {
        $relations = $startingRelation;
        for ($i = 0; $i < $depth - 1; $i++) {
            $relations .= '.children';
        }
        return $relations;
    }