update: add coupon and notice switch

This commit is contained in:
tokumeikoi
2022-01-22 02:30:05 +08:00
parent 94a7ab412c
commit 1790de63f6
8 changed files with 55 additions and 4 deletions

View File

@ -13,7 +13,8 @@ class NoticeController extends Controller
{
$current = $request->input('current') ? $request->input('current') : 1;
$pageSize = 5;
$model = Notice::orderBy('created_at', 'DESC');
$model = Notice::orderBy('created_at', 'DESC')
->where('show', 1);
$total = $model->count();
$res = $model->forPage($current, $pageSize)
->get();