mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-28 23:17:27 +08:00
fix: announcement sorting issue
This commit is contained in:
@@ -13,6 +13,7 @@ class NoticeController extends Controller
|
|||||||
$current = $request->input('current') ? $request->input('current') : 1;
|
$current = $request->input('current') ? $request->input('current') : 1;
|
||||||
$pageSize = 5;
|
$pageSize = 5;
|
||||||
$model = Notice::orderBy('sort', 'ASC')
|
$model = Notice::orderBy('sort', 'ASC')
|
||||||
|
->orderBy('id', 'DESC')
|
||||||
->where('show', true);
|
->where('show', true);
|
||||||
$total = $model->count();
|
$total = $model->count();
|
||||||
$res = $model->forPage($current, $pageSize)
|
$res = $model->forPage($current, $pageSize)
|
||||||
|
|||||||
Reference in New Issue
Block a user