What is pagination in Laravel?

Answer

Laravel provides elegant pagination out of the box. $users = User::paginate(15) returns a LengthAwarePaginator with the current page's results. In a Blade view, render pagination links with {{ $users->links() }} — this generates Bootstrap or Tailwind-styled pagination links automatically. Customize per-page: User::paginate(request("per_page", 15)). For simple prev/next navigation (more performant on large datasets): User::simplePaginate(15). For cursor-based pagination (fastest for large datasets, no total count): User::cursorPaginate(15). For APIs, paginate() returns JSON with data (current page items), current_page, last_page, per_page, total, and navigation links.