src/Transformers/Concerns/HasRelationships.php
protected function wrapChildRelations(array $nestedRelations, string $relation): array
    {
        return $this->mapRelations($nestedRelations, function ($nestedRelation, $constraint) use ($relation) {
            return ["$relation.$nestedRelation" => $constraint];
        });
    }
protected function wrapChildRelations(array $nestedRelations, string $relation): array
    {
        return $this->mapRelations($nestedRelations, function ($nestedRelation, $constraint) use ($relation) {
            return ["$relation.$nestedRelation" => $constraint];
        });
    }
Wrap the identifier of each relation of the given list of nested relations with
the parent relation identifier using dot notation.

@param  array  $nestedRelations
@param  string $relation
@return array