|
|
|
@ -68,6 +68,9 @@ class Notice extends BaseController |
|
|
|
} else { |
|
|
|
validate(NoticeValidate::class)->scene('add')->check($param); |
|
|
|
|
|
|
|
$queryRes = NoticeModel::where('id','>=',1)->find(); |
|
|
|
if ($queryRes) throw new ValidateException('限制只能发布1条公告'); |
|
|
|
|
|
|
|
$CustomerService = new NoticeModel(); |
|
|
|
$CustomerService->save([ |
|
|
|
'title' => $param['title'], |
|
|
|
|