0

I want apply pagination on laravel 4 by passing extra parameter to filter the result.

Aman Singh
  • 17
  • 1
  • 10

2 Answers2

3

You can do this by the appends method of pagination in laravel.

<?php echo $users->appends(array('sort' => 'votes'))->links(); ?>

Please use the laravel documentation:

http://laravel.com/docs/4.2/pagination#appending-to-pagination-links

OR

You can go through this link:

Laravel Pagination links not including other GET parameters

Look answer of Bald.

Community
  • 1
  • 1
Anshul Mishra
  • 1,706
  • 2
  • 15
  • 38
0

Look at the method signature here https://github.com/laravel/framework/blob/master/src/Illuminate/Database/Query/Builder.php#L1217 on line no 1385,

The following can be your solution

paginate($this->limit, $this->fields)

Thankyou.