PHP code example of fbf / laravel-youtube

1. Go to this page and download the library: Download fbf/laravel-youtube library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fbf / laravel-youtube example snippets


try {
    $youtubeVideoId = Youtube::upload($data);
} catch (Exception $e) {
    // Do something here
}

Youtube::upload(array(
    'title' => 'My video',
    'description' => 'This is what My video is about',
    'status' => 'unlisted', // or 'private' or 'public'
    'video' => $video, // Instance of Symfony\Component\HttpFoundation\File\UploadedFile see http://laravel.com/docs/requests#files
));