Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

peterhrobar's avatar

Paginating an API response in Livewire

I have an API endpoint that returns a LengthAwarePaginator result (so it simply paginates it's results).

I'm querying this API from a Livewire component and would like to set up pagination for displaying the results as well.

What would be the recommended approach to use the API response and turn it into a LengthAwarePaginator object as well?

I only used it before with database queries in Livewire but not with APIs.

Thank you in advance!

0 likes
1 reply

Please or to participate in this conversation.