Laravel 4.2 可以选择在 app/config/view.php
中指定自定义视图,例如:
/*
|--------------------------------------------------------------------------
| Pagination View
|--------------------------------------------------------------------------
|
| This view will be used to render the pagination link output, and can
| be easily customized here to show any view you like. A clean view
| compatible with Twitter's Bootstrap is given to you by default.
|
*/
'pagination' => 'pagination_slider-alt'
至少关于 view.php
,这在 Laravel 5 中消失了。
有没有办法在 Laravel 5 中复制这种行为?
原文由 user2094178 发布,翻译遵循 CC BY-SA 4.0 许可协议
而在 Laravel 4.2 中,我会使用:
在 Laravel 5 中,您可以使用以下内容复制上述内容:
Now in the included view,
$object
will have the pagination methods available, such ascurrentPage()
,lastPage()
,perPage()
, etc.您可以在 http://laravel.com/docs/5.0/pagination 查看所有可用的方法