private function assignAndResolveIncludes(
        ResourceManager $resourceManager,
        string $resource,
        ElementInterface $resourceOrCollection,
        Parameters $parameters
    )
    {
        $relations = collect();

        $availableIncludes = $this->retrieveRelationsRecursive($resource, $relations, $resourceManager);

        $resourceOrCollection->with($parameters->getInclude($availableIncludes->all()));
    }
private function assignAndResolveIncludes(
        ResourceManager $resourceManager,
        string $resource,
        ElementInterface $resourceOrCollection,
        Parameters $parameters
    )
    {
        $relations = collect();

        $availableIncludes = $this->retrieveRelationsRecursive($resource, $relations, $resourceManager);

        $resourceOrCollection->with($parameters->getInclude($availableIncludes->all()));
    }
private function assignAndResolveIncludes ( ResourceManager $ resourceManager , string $ resource , ElementInterface $ resourceOrCollection , Parameters $ parameters ) { $ relations = collect ( ) ; $ availableIncludes = $ this -> retrieveRelationsRecursive ( $ resource , $ relations , $ resourceManager ) ; $ resourceOrCollection -> with ( $ parameters -> getInclude ( $ availableIncludes -> all ( ) ) ) ; }
assigns resolved includes from request

@param ResourceManager $resourceManager
@param string $resource
@param ElementInterface $resourceOrCollection
@param Parameters $parameters
assigns resolved includes from request