src/Eloquent/Concerns/IncludesModels.php
protected function getRelationshipPaths($includePaths)
    {
        return $this
            ->convertIncludePaths($includePaths)
            ->merge($this->defaultWith)
            ->unique()
            ->all();
    }
protected function getRelationshipPaths($includePaths)
    {
        return $this
            ->convertIncludePaths($includePaths)
            ->merge($this->defaultWith)
            ->unique()
            ->all();
    }
Get the relationship paths to eager load.

@param Collection|array $includePaths
the JSON API resource paths to be included.
@return array