Laravel 5.3 Pagination Total number of pages

30.6k views Asked by At

I have a Paginator instance $paginator in Laravel App, I want to display 'Last' in pagination, so I need a link to the last page. How to get the last page number in laravel 5.3?

1

There are 1 answers

3
Alexey Mezenin On BEST ANSWER

Use $results->lastPage() paginator method.

https://laravel.com/docs/5.3/pagination#paginator-instance-methods