fix:分页方法修改
This commit is contained in:
parent
e48a8d4e0f
commit
9e23d02980
@ -130,9 +130,14 @@ abstract class BaseController
|
||||
*/
|
||||
protected static function pageWrapper($query)
|
||||
{
|
||||
return (clone $query)->page(
|
||||
(int) Request::param('page', 1),
|
||||
(int) Request::param('limit', 10)
|
||||
);
|
||||
$query_copy = (clone $query);
|
||||
if (Request::param('all') === true) {
|
||||
return $query_copy;
|
||||
} else {
|
||||
return $query_copy->page(
|
||||
(int) Request::param('page', 1),
|
||||
(int) Request::param('limit', 10)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user