I want apply pagination on laravel 4 by passing extra parameter to filter the result.
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.
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.