【已解决】tp5.0.5 分页怎么用

浏览:4852 发布日期:2017/02/01 分类:ThinkPHP5专区
怪我咯,清除缓存就好了... 大半夜在这刷贴了

这前5.0.3 分页用的好好的,更新到5.0.5后,就不行的啦//分类列表
    public function cate_list(){
        $list = db('article_cat')->order('cat_rank ASC')->paginate(2);
        print_r($list);
        $this->assign('list',$list);
        return $this->fetch();
    }
打印输出:think\paginator\driver\Bootstrap Object
(
    [simple:protected] => 
    [items:protected] => think\Collection Object
        (
            [items:protected] => Array
                (
                    [0] => Array
                        (
                            [id] => 2
                            [cat_name] => aaa
                            [cat_rank] => 0
                        )

                    [1] => Array
                        (
                            [id] => 3
                            [cat_name] => bbb
                            [cat_rank] => 0
                        )

                )

        )

    [currentPage:protected] => 1
    [lastPage:protected] => 2
    [total:protected] => 4
    [listRows:protected] => 2
    [hasMore:protected] => 1
    [options:protected] => Array
        (
            [var_page] => page
            [path] => /index.php/admin/Article/cate_list
            [query] => Array
                (
                )

            [fragment] => 
            [type] => bootstrap
            [list_rows] => 15
        )

)
到底咋用嘛,手册上说用法不变
最佳答案
评论( 相关
后面还有条评论,点击查看>>