We've ignored that pesky
Lesson::all() long enough! Sure, it's fine when we have fifty records, but what about when that number becomes fifty thousand? Do you really want to fetch all those for each request? Of course you don't. Let's figure out how to paginate our API results.
Published on Nov 11th, 2015.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.