PHP code example of tuyakhov / yii2-youtube
1. Go to this page and download the library: Download tuyakhov/yii2-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/ */
tuyakhov / yii2-youtube example snippets
\tuyakhov\youtube\EmbedWidget::widget([
'code' => 'vs5ZF9fRDzA',
'playerParameters' => [
'controls' => 2
],
'iframeOptions' => [
'width' => '600',
'height' => '450'
]
]);
public function rules()
{
return [
['youtube_code', CodeValidator::className()],
];
}
php composer.phar