thephpleague / monga

Simple and swift MongoDB abstraction.
MIT License
331 stars 30 forks source link

Use of Pagination on result query #39

Closed fehrenmann closed 7 years ago

fehrenmann commented 7 years ago

First of all, congratulations for this good and simple MongoDB abstraction layer. Perhaps i missed something (as i'm a new user of CakePHP3), but is there a way to use CakePHP3 pagination on result queries ? Thanks !

bcrowe commented 7 years ago

Hi @fehrenmann,

So, you wouldn't be able to directly plug into CakePHP's PaginatorComponent, as the component is pretty much tied to Cake's interfaces. But, you could explore creating a Cake datasource on top of this library for Mongo. A good example on how to create a new Cake datasource is: https://github.com/cakephp/elastic-search.

For any deeper questions, I would probably say asking around Cake's IRC/Slack/Discourse would be the best place to get help.