cethyworks/doctrine-paginator-decorator
Decorator/helper for Doctrine\ORM\Tools\Pagination\Paginator.
1. Composer require
$ composer require cethyworks/doctrine-paginator-decorator
$paginator = new DoctrinePaginatorDecorator($queryBuilder, $currentPage, $limitPerPage);
$paginator->getPage(); // return current page
$paginator->getLimit(); // return limit per page
$paginator->hasNextPage(); // return true if there is enough result for a next page
$paginator->getCount(); // return total entity count
$paginator->getList(); // return entity list for current page
How can I help you explore Laravel packages today?