Hello!
I need to paginate an array of data and the render method works, the url is correct but they always show the same items!
$items= new Paginator($items,20);
return View::make('transactions.backpack')->with('items', $items);
I tried to use the array_slice method but then the pagination does't work (because it's always the last page)
I am almost sure that I am not using the paginator class correctly, but I really didn't find a place that explains how to use it with an array (without Eloquent).
@uxweb Thank you for the answer! But I am afraid I already did that. The problem of slicing the array first is that when I pass it to the view it has the flag "hasMore" false (because the sliced array really has no more items) . Also, how can I get the
Paginator::resolveCurrentPage();
if there is no instance of Paginator to this point?