示例#1
0
 /**
  * Delete Videos
  *
  * @return bool
  */
 public function deleteData($video_id)
 {
     $validator = Validator::make(array('video_id' => $video_id), array('video_id' => array('required')));
     // Validation did not pass
     if ($validator->fails()) {
         throw new Exception($validator->messages());
     }
     try {
         $video = Videos::findOrFail($video_id);
         $video->delete();
         return true;
     } catch (Exception $ex) {
         return $ex;
     }
 }