src/Transformers/Concerns/HasRelationships.php
protected function mappedTransformers(array $relations): array
    {
        $transformers = collect($this->availableRelations())->filter(function ($transformer) {
            return ! is_null($transformer);
        })->map(function ($transformer) {
            return $this->resolveTransformer($transformer);
        })->all();

        return array_intersect_key($transformers, $relations);
    }
protected function mappedTransformers(array $relations): array
    {
        $transformers = collect($this->availableRelations())->filter(function ($transformer) {
            return ! is_null($transformer);
        })->map(function ($transformer) {
            return $this->resolveTransformer($transformer);
        })->all();

        return array_intersect_key($transformers, $relations);
    }
Resolve a list of transformers from a list of relations mapped to transformers.

@param  array $relations
@return array