Youtube Frame Generator
Laravel package allows you to generate an iframe tag with a video player depending on a youtube URL.
1 - Dependency
The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:
composer require syrian-open-source/laravel-youtube-iframe-generator
2 - Copy the package providers to your local config with the publish command, this will publish the config:
php artisan yframe:install
Features
basic usage:
{!! \SOS\LaravelYoutubeFrameGenerator\Facades\YFrameFacade::generate('https://www.youtube.com/watch?v=35JzR2ymxJE')!!}
If you want to set your css, attributes, height, width or fullscreen allowed:
{!! \SOS\LaravelYoutubeFrameGenerator\Facades\YFrameFacade::width('100%')
->height('400px')
->isFullscreen(true)
->generate('https://www.youtube.com/watch?v=35JzR2ymxJE'); !!}
Changelog
Please see the CHANGELOG for more information about what has changed or updated or added recently.
Security
If you discover any security related issues, please email them first to [email protected], if we do not fix it within a short period of time please open a new issue describing your problem.