Commit 9f96744d by 杨树贤

分页问题

parent 129d59c5
Showing with 2 additions and 1 deletions
......@@ -60,10 +60,11 @@ class ArticleModel extends BaseModel
},
])
->where($map);
$total = $query->count();
$data = $query->page($page, $pageSize)
->orderBy('art_id', 'desc')
->get()->toArray();
$total = $query->count();
return compact('data','total');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment