Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CursorInterface::getUrl? #376

Open
matt-allan opened this issue Apr 17, 2017 · 3 comments
Open

CursorInterface::getUrl? #376

matt-allan opened this issue Apr 17, 2017 · 3 comments
Labels

Comments

@matt-allan
Copy link
Contributor

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.

@greydnls
Copy link
Contributor

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 👍 on it, but I want to make sure I understand.

@Insolita
Copy link

Insolita commented Oct 5, 2020

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

@stale
Copy link

stale bot commented Apr 16, 2022

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.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants