TP 5.0 报错 Indirect modification of overloaded element ofthinkpaginatordriverBootstrap has no effect

废话不多说直接代码

 

//省略前部分代码.......
$list = Db::name('ads')
    ->where($whr)
    ->paginate(10,false,[
        'query'=> Request::param()
    ]);
$list_copy = $list->toArray();       //把原list转换成数组,并且copy一份
 
foreach ($list_copy['data'] as $k=>$v){    
    $list_copy['data'][$k]['class_name_cn'] = $this->getClassName($v['class_id']);
}
$this->assign('list',$list);            //前台使用此变量完成分页和手册一样
$this->assign('lsit_copy',$list_copy); //注意前台使用此变量进行数据循环,

 

你可能感兴趣的:(tp5)