/** * Remove the specified resource from storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function destroy(Request $request) { $video_id = $request['video_id']; Video::destroy($video_id); return redirect()->route('videos.index'); }
/** * @param $category * @return \Illuminate\Http\Response */ public function show($category) { $videos = Video::where('video_category', $category)->get(); return view('pages.index')->withVideo($videos); }