fix: announcement sorting issue

This commit is contained in:
xboard
2025-07-22 04:28:39 +08:00
parent 7adfd160cc
commit 97f84286d8

View File

@@ -13,6 +13,7 @@ class NoticeController extends Controller
$current = $request->input('current') ? $request->input('current') : 1;
$pageSize = 5;
$model = Notice::orderBy('sort', 'ASC')
->orderBy('id', 'DESC')
->where('show', true);
$total = $model->count();
$res = $model->forPage($current, $pageSize)