【发布时间】:2015-10-23 05:29:53
【问题描述】:
在这方面工作太久了,没有结果。我试过了。
`\Illuminate\Pagination\Paginator::setCurrentPage($current_page);`
返回
Call to protected method Illuminate\Pagination\Paginator::setCurrentPage()
\Paginator::setCurrentPage($current_page);
返回Call to protected method Illuminate\Pagination\Paginator::setCurrentPage()
\DB::getPaginator()->setCurrentPage($current_page);
返回call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Database\MySqlConnection' does not have a method 'getPaginator'
$tmp = new Post( ); $tmp->getConnection()->setCurrentPage($current_page);
返回call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Database\MySqlConnection' does not have a method 'getPaginator'
如何指定页面?我需要手动指定。
我希望它像$model->find( )->paginate($per_page, $page) 一样简单
【问题讨论】:
-
我也有这个问题,如果我解决了会告诉你
标签: php pagination laravel-5.1