fix: announcement sorting issue

This commit is contained in:
xboard 2025-07-22 04:28:39 +08:00
parent d9b290b0f4
commit 44486adb46

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)