Laravel 4 - Using multiple paginators on one page

Posted by Fry Farnsworth on Stack Overflow See other posts from Stack Overflow or by Fry Farnsworth
Published on 2014-08-20T21:48:54Z Indexed on 2014/08/20 22:20 UTC
Read the original article Hit count: 240

Filed under:
|
|

I've been googling for this question but can't find any good answers. I found that there is a method called setPageName() for the paginator but it only works when used like Paginator::setPageName('page').

I looked up the paginator in the Laravel API (http://laravel.com/api/class-Illuminate.Pagination.Environment.html) and the method is a public function just like setBaseUrl which I am currently using like $albums->setBaseUrl('/album/');

for instance I want to have a Photo paginator (?photoPage=n) and a Comment paginator (?commentPage=n).

Is there any way that I can use two paginators that use different page names in the URL on one page, or at least call the setPageName() method like setBaseUrl()?

© Stack Overflow or respective owner

Related posts about php

Related posts about laravel-4