PHP code example of fomvasss / youtube
1. Go to this page and download the library: Download fomvasss/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/ */
fomvasss / youtube example snippets
Fomvasss\Youtube\YoutubeServiceProvider::class,
use Fomvasss\Youtube\Facades\Youtube;
Youtube::iFrame('https://www.youtube.com/watch?v=Dxk47dya8_k'); //returt String iframe
$link = 'https://www.youtube.com/watch?v=Dxk47dya8_k';
Youtube::iFrame($link, ['rel'=> 0, 'autoplay'=>1, 'controls'=>1, 'showinfo'=>1, 'width'=>720, 'height'=>460, 'frameborder'=>0])
@youtube("https://www.youtube.com/watch?v=Dxk47dya8_k")
@youtube('<iframe width="640" height="360" src="https://www.youtube.com/embed/Dxk47dya8_k?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>')
@youtube("Dxk47dya8_k")
@youtube('https://www.youtube.com/watch?v=Dxk47dya8_k', ['width'=>720, 'height'=>460,])
youtube_iframe('https://www.youtube.com/watch?v=Dxk47dya8_k');
bash
php artisan vendor:publish --provider="Fomvasss\Youtube\YoutubeServiceProvider" --tag="config"