SmokeTM
1 month ago
123
2
Laravel

Laravel paginate Cashier Invoices

Posted 1 month ago by SmokeTM

I want to paginate my invoices from stripe. What I did is I used a Paginator like so

$invoices = auth()->user()->invoices();
$invoices = new Paginator($invoices, 2);

$invoices->withPath('/settings/invoices');

The problem is when I paginate the invoices only the first page gets loaded and if I click on next the page stays the same, so no further invoices are loaded.

View

{{ $invoices->links() }}

Normally it should work that way?

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