PHP code example of samo / youtubeiframe
1. Go to this page and download the library: Download samo/youtubeiframe 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/ */
samo / youtubeiframe example snippets
use Samo\YoutubeIframe\Iframe;
public function index()
{
$iframe = Iframe::css('border-radius:50px;')
->width(100,'%')
->height(400,'px')
->noFullScreen()
->get('https://www.youtube.com/watch?v=35JzR2ymxJE');
return $iframe;
}
html
<div class="video_container">
{!! Samo\YoutubeIframe\Iframe::css('border-radius:50px;')
->width(100,'%')
->height(400,'px')
->noFullScreen()
->get('https://www.youtube.com/watch?v=35JzR2ymxJE')!!}
</div>