remove = TRUE; $o->save(); return redirect() ->action('VideoController@info',[$o->id]); } public function deletes(Request $request,$id=NULL) { return view('catalog.deletereview',[ 'catalog'=>is_null($id) ? Video::where('remove',1) ->with(['software.model.make']) ->paginate($request->input('list',self::list_deletes)) : Video::where('id',$id) ->paginate(1), 'return'=>url('v/deletes'), 'type'=>'video', ]); } public function duplicates(Request $request,$id=NULL) { return view('catalog.duplicatereview',[ 'catalog'=>is_null($id) ? Video::duplicates() ->with(['software.model.make']) ->paginate($request->input('list',self::list_duplicates)) : Video::where('id',$id) ->paginate(1), 'return'=>url('v/duplicates'), 'type'=>'video', ]); } public function undelete(Video $o) { $o->remove = NULL; $o->save(); return redirect() ->action('VideoController@info',[$o->id]); } public function view(Video $o) { if ($o->isReadable()) (new VideoStream($o->file_name(FALSE))) ->start(); } }