简体   繁体   中英

How can I pass extra parameter in pagination by using Laravel 4?

我想通过传递额外的参数来过滤结果在laravel 4上应用分页。

You can do this by the method of pagination in laravel. 在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 . 答案。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM