Exemplo n.º 1
0
 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');
     }
 }
Exemplo n.º 2
0
 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)));
         }
     }
 }