Add Parameters to Pagination Links

In default Pagination links, you can pass additional parameters, preserve the original query string, or even point to a specific #xxxxx anchor.

1{{ $users->appends(['sort' => 'votes'])->links() }}
2 
3{{ $users->withQueryString()->links() }}
4 
5{{ $users->fragment('foo')->links() }}

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord