diff --git a/app/Http/Controllers/Admin/NoticeController.php b/app/Http/Controllers/Admin/NoticeController.php index 94b52b57..8c0a16e7 100644 --- a/app/Http/Controllers/Admin/NoticeController.php +++ b/app/Http/Controllers/Admin/NoticeController.php @@ -21,8 +21,11 @@ class NoticeController extends Controller 'title', 'content' ]); + if (!Notice::create($data)) { + abort(500, '保存失败'); + } return response([ - 'data' => Notice::create($data) + 'data' => true ]); } }