Description
This has come from a discussion on Slack...
At the moment our pagination implementation always applies a sort by primary key - so that pages are in a deterministic order. This is a sensible approach and a useful default. However, the developer might have a good reason for not needing it, and so it might be applying an unnecessary order by to the database query.
We should provide method that can be called on the paginator to turn it off. (It should remain "on" by default.)
We should also provide an ability for the developer to determine, via a closure, whether or not it should be on. E.g. the developer might not need it applied if the client has provided a particular sort when requesting the page. The callback could receive the query builder instance and determine whether or not the deterministic order should be applied.