How to Get First Page Last Page Total Page in Laravel Pagination
In this example i will show you that how we can get first page from laravel pagination. I also show you that how to show get last page, total page from laravel pagination. If you don't know how to do that then this example is for you.
Sometimes we need to show first page, sometimes need last page, total page etc. In this tutorial you will know how we can show that. I will share souce code with you so that you can create it and use it.
$users = User::paginate(10)->onFirstPage();
$users = User::paginate(10)->lastPage();
$users = User::paginate(10)->total();
Hope it can help you.