We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbf9cf7 commit ee96294Copy full SHA for ee96294
src/Model.php
@@ -453,13 +453,15 @@ protected function sanitizePageNumber(int $number) : int
453
/**
454
* A basic function to paginate all rows of the table.
455
*
456
- * @param int $page The current page
457
- * @param int $perPage Items per page
+ * @param mixed $page The current page
+ * @param mixed $perPage Items per page
458
459
* @return array<int,array<mixed>|Entity|stdClass>
460
*/
461
- public function paginate(int $page, int $perPage = 10) : array
+ public function paginate(mixed $page, mixed $perPage = 10) : array
462
{
463
+ $page = Pager::sanitize($page);
464
+ $perPage = Pager::sanitize($perPage);
465
$data = $this->getDatabaseToRead()
466
->select()
467
->from($this->getTable())
0 commit comments