Mmm, edit button broken so I can't fix the example code. But it should make sense...
Oct 16, 2014
1
Level 4
L5 Pagination with numbered pages
Has anyone figured out how to use the new pagination with Eloquent models in Laravel 5 to display anything other than the simple version with only next and previous links? I'm upgrading a site and I used to use the numbered page pagination, which is the same as is used here on Laracasts, however I cannot figure out how to do it!
It seems like it now involves manually bootstrapping the pagination process... which doesn't really fit with the reasoning for changing it: to make it simpler.
Does anyone have any ideas?
I'm currently doing this to retrieve a paginated record set:
$query->paginate($perPage);
Looping to display with:
@forelse ($invoices as $invoice)
...
And rendering the links with:
{!! $invoices->render(); !!} ```
Please or to participate in this conversation.