laravel 如何自定义 Pagination::slider 视图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17317515/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 08:01:52  来源:igfitidea点击:

How to customize Pagination::slider view

paginationlaravellaravel-4

提问by Cysioland

I want to do some changes in Pagination::slider view, such as adding class and changing arrow style. How can I achieve that?

我想在 Pagination::slider 视图中做一些更改,例如添加类和更改箭头样式。我怎样才能做到这一点?

回答by Jason Lewis

You can change the view by adjusting the configuration option in app/config/view.php. Look for the paginationconfiguration option, by default it will be pagination::slider. This view namespace is set in the view environment.

您可以通过调整 中的配置选项来更改视图app/config/view.php。查找pagination配置选项,默认情况下它将是pagination::slider. 这个视图命名空间是在视图环境中设置的

Simply change this value to something like pagination.sliderand then create the view in views/pagination/slider.php. You can then copy the original slider viewand adjust it to fit your needs.

只需将此值更改为类似的值pagination.slider,然后在views/pagination/slider.php. 然后,您可以复制原始滑块视图并对其进行调整以满足您的需要。