public function getVer($id) { $video = SFVideos::find(strstr($id, '-', true)); if ($video) { $args = array('video' => $video, 'route' => self::$route); return View::make('frontend.video.ver')->with($args); } else { return View::make('specialpages.404'); } }
public function getDelete($id = '') { if ($id == '') { return Redirect::to($this->route)->with('msg_error', Lang::get('messages.videos_display_err')); } else { $video = SFVideos::find($id); $delete = SFVideos::destroy($id); if (!$delete) { return Redirect::to($this->route)->with('msg_error', Lang::get('messages.videos_delete_err', array('title' => $video->title))); } else { return Redirect::to($this->route)->with('msg_success', Lang::get('messages.videos_delete', array('title' => $video->title))); } } }