Laravel package allows you to generate an iframe tag with a video player depending on a youtube URL.

v1.1.0 2022-02-05 08:26 UTC

This package is auto-updated.

Last update: 2023-03-11 20:45:38 UTC



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


basic usage:

{!! \SOS\LaravelYoutubeFrameGenerator\Facades\YFrameFacade::generate('')!!}

Or you can use the directive


If you want to set your css, attributes, height, width or fullscreen allowed:

{!! \SOS\LaravelYoutubeFrameGenerator\Facades\YFrameFacade::width('100%')
        ->generate(''); !!}

Using the directive

@yframe('', [
    'width'     => '100%',
    'height'    => '400px',
    'isFullscreen'  => true,


Please see the CHANGELOG for more information about what has changed or updated or added recently.


If you discover any security related issues, please email them first to, if we do not fix it within a short period of time please open a new issue describing your problem.


About Syrian Open Source

The Syrian Open Source platform is the first platform on GitHub dedicated to bringing Syrian developers from different cultures and experiences together, to work on projects in different languages, tasks, and versions, and works to attract Syrian developers to contribute more under one platform to open source software, work on it, and issue it with high quality and advanced engineering features, which It stimulates the dissemination of the open-source concept in the Syrian software community, and also contributes to raising the efficiency of developers by working on distributed systems and teams.