public function collection($data, $transformer = null, $resourceKey = null): Collection
    {
        return new Collection($data, $transformer, $resourceKey);
    }
public function collection($data, $transformer = null, $resourceKey = null): Collection
    {
        return new Collection($data, $transformer, $resourceKey);
    }
public function collection ( $ data , $ transformer = null , $ resourceKey = null ) : Collection { return new Collection ( $ data , $ transformer , $ resourceKey ) ; }
Create new Collection resource.

@param mixed       $data
@param mixed|null  $transformer
@param string|null $resourceKey

@return Collection
Create new Collection resource .