danieln
2 years ago
973
43
Laravel

Laravel pagination links not working

Posted 2 years ago by danieln

I have this code on the view that is displaying for pagination correctly

{{$products->links()}} The link created are correct:

http://demo.com/default?page=2 However, the items that is listed remains to be on the first page only. Could there be anything wrong?

FYI, in the controller I have this to generate the data

$products = \App\Product::paginate(1);

Please sign in or create an account to participate in this conversation.