Laravel 5.7 has a new pagination method to customize the number of links on each side of the paginator. Thanks to the new method you no longer need a custom pagination view in some cases. Here’s the API you can use to define the link count on each side of the current page:
A cool new @laravelphp 5.7 feature:
You can customize the number of pages to show on each side of the current page without having to extend the pagination view. ???? pic.twitter.com/P7ywcbqhHQ
— Rachid Laasri (@RashidLaasri) August 21, 2018
This new feature will be excellent to cut out the need for a custom template in some cases, but it’s still useful to know how to customize the pagination view.
Editors Note: At the time of writing the method was
linksOnEachSide but it was later changed to
Join 31,000+ others and never miss out on new tips, tutorials, and more.
- Senior Full-Stack Engineer
[REMOTE: USA Only] All Other Applications Will be Rejected Immediately"
- Senior Full Stack PHP Developer
Motto Design Studio
- Senior Software Engineer
Remote or Los Angeles
- Sr. Software Engineer
Salt Lake City, UT
- Senior Developer