Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Use for Merged Collections #21

Open
zerubabbel opened this issue Dec 14, 2020 · 0 comments
Open

Use for Merged Collections #21

zerubabbel opened this issue Dec 14, 2020 · 0 comments

Comments

@zerubabbel
Copy link

Hi there. Thank you for creating this great tool. I was wondering, is there a way to implement the CursorPagination on merged collections that are not directly created from Eloquent Models or query builders? I need to merge a few collections for what I am doing, and then would like to create new cursor paginator based on the merged collection.

When I make a custom new CursorPaginator like this, it will create the first page just fine, but when I call the next_cursor, it does not return the next page of data:

new CursorPaginator($collection1, 15, [
'identifier' => 'id',
'identifier_alias' => 'id',
'date_identifier' => false,
'path' => request()->path(),
]);

Thanks so much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant