Ep17 - API Response Pagination | Laravel API Server

preview_player
Показать описание


Having our API server return all of our database records from the index method is certainly not the right way. The appropriate way is to display the results on a page-by-page basis. Let's see how we can achieve this in Laravel.

------------

Source code for this lesson:


** Affiliated links
Earn passive income from crypto while you sleep! Get started on Nexo today! Up to 12% annual interest. Get $10 USD reward if you use my referral link below.

Use the legendary Git GUI for FREE! You are seriously missing out if you are not using it.

Beautiful designs created instantly to wow your social networks!

A simple and scalable cloud hosting platform for all developer needs.

Get started on Crypto today. Gets 10% off of all crypto trading fee if you use my referral link below.

Outro Music:
Рекомендации по теме
Комментарии
Автор

The same pagination works with for example Facebook publications view? I try to build a page like this but i not sure if using laravel pagination. I think each time user is at the bottom of publications I can request thr server the next page of records.

bryanperez
Автор

It's pretty cool. Thanks you very much.

mohammadhosseinmoradi
Автор

how to include the page_size request (if supplied) in the pagination links?

jopaymaymay