fractal
fractal copied to clipboard
CursorInterface::getUrl?
The paginator interface has getUrl but the cursor interface doesn't. I want to get the url for a specific cursor in my responses to show next/prev links, so I have to workaround the interface and do an instance of check right now.
Would you mind showing the code you're currently using so I can get a feel for what you're doing? I'm leaning towards :+1: on it, but I want to make sure I understand.
When we use collection with Pagination, the response contains pagination links for self/next/last, etc.
https://github.com/thephpleague/fractal/blob/9c9c493edcf0f5438555e5b515a790749a26c807/src/Serializer/JsonApiSerializer.php#L108-#L137
But CursorPaginator provides only metadata, not links.
https://github.com/thephpleague/fractal/blob/9c9c493edcf0f5438555e5b515a790749a26c807/src/Serializer/ArraySerializer.php#L129-#L139
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you for your contributions.