|
@@ -103,6 +103,17 @@ class VideoGroupController extends Controller {
|
|
|
}
|
|
|
return $this->videoGroupRepository->edit($data);
|
|
|
}
|
|
|
+ //删除内容
|
|
|
+ public function delete(Request $request){
|
|
|
+ $data = $request->only('id');
|
|
|
+ $validator = Validator::make($data, [
|
|
|
+ 'id' => 'required|integer|max:12',
|
|
|
+ ]);
|
|
|
+ if ($validator->fails()) {
|
|
|
+ return $this->response->error($validator->errors()->first(), 500);
|
|
|
+ }
|
|
|
+ return $this->videoGroupRepository->delete($data['id']);
|
|
|
+ }
|
|
|
//添加分组内容
|
|
|
public function addVideoInfo(Request $request){
|
|
|
$data = $request->only('video_group_id','post_id');
|
|
@@ -115,6 +126,7 @@ class VideoGroupController extends Controller {
|
|
|
}
|
|
|
return $this->videoGroupRepository->addVideoInfo($data);
|
|
|
}
|
|
|
+
|
|
|
//删除内容
|
|
|
public function deleteVideoInfo(Request $request){
|
|
|
$data = $request->only('id');
|