remove = TRUE; $o->save(); return redirect()->action('VideoController@info',[$o->id]); } public function deletes($id=NULL) { return view('catalog.deletereview',[ 'catalog'=>is_null($id) ? Video::where('remove',1)->with(['software.model.make'])->paginate($this->list_deletes) : Video::where('id',$id)->paginate(1), 'return'=>url('v/deletes'), 'type'=>'video', ]); } public function duplicates($id=NULL) { return view('catalog.duplicatereview',[ 'catalog'=>is_null($id) ? Video::duplicates()->with(['software.model.make'])->paginate($this->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_path()))->start(); } }