You've already forked guangan
排序
This commit is contained in:
@ -15,7 +15,7 @@ class Article extends Controller
|
|||||||
$subQuery->where('cid', $categoryId);
|
$subQuery->where('cid', $categoryId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$articles = $query->field('id,title,thumb,author,from,view_count,publish_at')->order('sort asc,id desc')->paginate();
|
$articles = $query->field('id,title,thumb,author,from,view_count,publish_at')->order('sort asc,create_at desc')->paginate();
|
||||||
$this->success('获取文章列表', $articles);
|
$this->success('获取文章列表', $articles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class Thumb extends Controller
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$thumbList = CmsThumb::mk()->scope('published')->paginate();
|
$thumbList = CmsThumb::mk()->scope('published')->order('sort asc,create_at desc')->paginate();
|
||||||
$this->success('获取点赞城市列表', $thumbList);
|
$this->success('获取点赞城市列表', $thumbList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ class Tutorial extends Controller
|
|||||||
{
|
{
|
||||||
public function index() {
|
public function index() {
|
||||||
$query = CmsTutorial::mk()->where('status', 1);
|
$query = CmsTutorial::mk()->where('status', 1);
|
||||||
$articles = $query->order('sort asc,id desc')->paginate();
|
$articles = $query->order('sort asc,create_at desc')->paginate();
|
||||||
$this->success('获取文章列表', $articles);
|
$this->success('获取文章列表', $articles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user