优化分页问题;

This commit is contained in:
2022-03-16 23:07:55 +08:00
parent ff765728d5
commit d2cb402f71

View File

@@ -28,7 +28,9 @@ class Post extends Common
$list = ModelPost::with(['categorys.category', 'tags.tag']) $list = ModelPost::with(['categorys.category', 'tags.tag'])
->where('type', $this->request->param('type', 1)) ->where('type', $this->request->param('type', 1))
->order('id desc') ->order('id desc')
->paginate(); ->paginate([
'query' =>$this->request->get()
]);
View::assign('list', $list); View::assign('list', $list);