Exemplo n.º 1
0
 public function getMP4($id)
 {
     $mp4 = MP4::find($id);
     $mp4->download += 1;
     $mp4->save();
     if ($mp4) {
         $youtube_url = 'http://savefrom.net/#url=' . urlencode('https://www.youtube.com/watch?v=' . $mp4->youtube_id);
         return Redirect::to($youtube_url);
     } else {
         return Redirect::to('/mp4')->withMessage('Nou regrèt, men ou pa ka telechaje videyo ou vle a.');
     }
 }