示例#1
0
 public function destroy($id)
 {
     $cover = Cover::find($id);
     $cover->delete();
     flash()->success('删除成功');
     return redirect()->back();
 }
示例#2
0
 public function update(array $data, $id)
 {
     $cover = Cover::find($id);
     $cover->name = $data['name'];
     $cover->cover_url = $data['cover_url'];
     $cover->display = $data['display'];
     $cover->save();
     return $cover;
 }