ThinkPHP 5:ページングpaginate()
522 ワード
パラメータ
paginate(1ページあたりの数、簡潔なページングかどうか、ページングパラメータ)
使用方法
カスタムパラメータパラメータパラメータパラメータ
その他のパラメータ
paginate(1ページあたりの数、簡潔なページングかどうか、ページングパラメータ)
使用方法
$list = db('user')->paginate(10);
カスタムパラメータパラメータパラメータパラメータ
$list = db('user')->paginate(10,false,['query'=>array('id' => $id)]);
その他のパラメータ
//
$this->assign('total',$list->total());
//
$total= ceil($list->total() / 10);
$this->assign('totalPage', $total);
//
$page = input('page', 1);