mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 12:37:54 +08:00
update
This commit is contained in:
@ -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
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user