laravel toarray 怎么分页
1个回答
展开全部
//设置分页容器 /app/models/ZurbPresenter.php
<?php
class ZurbPresenter extends Illuminate\Pagination\Presenter {
public function getPageLinkWrapper($url, $page, $rel = null)
{
$rel = is_null($rel) ? '' : ' rel="'.$rel.'"';
return '<li><a href=javascript:goodslist("'.$url.'");>'.$page.'</a></li>';
}
public function getDisabledTextWrapper($text)
{
return '<li class="disabled"><span>'.$text.'</span></li>';
}
public function getActivePageWrapper($text)
{
return '<li class="active"><span>'.$text.'<禅渗敏/span></喊稿li>';
}
}
//设置分页模板 /app/view/page/page.blade.php
<ul class="pagination">
<?php echo with(new ZurbPresenter($paginator))->render(); ?>
</ul>
//设贺枝置配置文件 /app/config/view.php
<?php
class ZurbPresenter extends Illuminate\Pagination\Presenter {
public function getPageLinkWrapper($url, $page, $rel = null)
{
$rel = is_null($rel) ? '' : ' rel="'.$rel.'"';
return '<li><a href=javascript:goodslist("'.$url.'");>'.$page.'</a></li>';
}
public function getDisabledTextWrapper($text)
{
return '<li class="disabled"><span>'.$text.'</span></li>';
}
public function getActivePageWrapper($text)
{
return '<li class="active"><span>'.$text.'<禅渗敏/span></喊稿li>';
}
}
//设置分页模板 /app/view/page/page.blade.php
<ul class="pagination">
<?php echo with(new ZurbPresenter($paginator))->render(); ?>
</ul>
//设贺枝置配置文件 /app/config/view.php
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询