Marwelln
Marwelln

Reputation: 29413

How can I limit the numbers of links returned by paginate?

The current {{ $videos->links() }} returns 13 links (including prev, next and ...), this is to much for a page I'm making. Is there a way to have it return less links? I couldn't find any way by looking at the source code.

Upvotes: 1

Views: 1603

Answers (1)

Jason Lewis
Jason Lewis

Reputation: 18665

The majority of numbers relating to pagination are hard coded into the presenter. Like @AlexGuth has said in his comment you'll need to create a custom presenter so you can overload these methods and adjust the hard coded numbers.

Upvotes: 2

Related Questions