PHP code example of alex290 / yii2-embed

1. Go to this page and download the library: Download alex290/yii2-embed 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/ */

    

alex290 / yii2-embed example snippets


<?= \alex290\embed\Embed::widget(['url' => 'https://www.youtube.com/watch?v=Pwe-pA6TaZk']); 

<?= \alex290\embed\Embed::widget(['url' => 'https://www.youtube.com/watch?v=Pwe-pA6TaZk', 'type'=> 'video']); 

<?= \alex290\embed\Embed::widget(['url' => 'https://www.youtube.com/watch?v=Pwe-pA6TaZk', 'type'=> 'video', 'width'=> 800, 'height' => 600 ]); 

<?= \alex290\embed\Embed::widget(['url' => 'https://www.youtube.com/watch?v=Pwe-pA6TaZk', 'type'=> 'img']); 

php composer.phar