This commit is contained in:
root
2019-12-12 14:34:28 +08:00
parent 6ccd8e583f
commit 055f5f8f7d
2 changed files with 14 additions and 0 deletions

View File

@ -28,4 +28,17 @@ class NoticeController extends Controller
'data' => true
]);
}
public function update (NoticeSave $request) {
$data = $request->only([
'title',
'content'
]);
if (!Notice::where('id', $request->input('id'))->update($data)) {
abort(500, '保存失败');
}
return response([
'data' => true
]);
}
}