We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfc7d12 commit 885ebe4Copy full SHA for 885ebe4
CHANGELOG.md
@@ -1,6 +1,12 @@
1
Change Log
2
==========
3
4
+2020-06-24 - 1.2.4
5
+------------------
6
+
7
+ * fix method calls when setting up pagination; calling `setCurrentPage` before `setMaxPerPage`
8
+ causes a failure with pagerfanta > 2.1.3.
9
10
2020-05-13 - 1.2.3
11
------------------
12
src/ModelBuilder.php
@@ -274,7 +274,7 @@ public function count(): int
274
*/
275
public function paginate(int $page = 1, int $perPage = 30): Pagerfanta
276
{
277
- return (new Pagerfanta(new PaginatorAdapter($this)))->setCurrentPage($page)->setMaxPerPage($perPage);
+ return (new Pagerfanta(new PaginatorAdapter($this)))->setMaxPerPage($perPage)->setCurrentPage($page);
278
}
279
280
/**
0 commit comments