PHPackages                             fomvasss/youtube - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. fomvasss/youtube

ActivePackage[Image &amp; Media](/categories/media)

fomvasss/youtube
================

Package for generate IFrame with youtube-link

v1.3.0(7y ago)94.9k↓33.3%3[2 issues](https://github.com/fomvasss/youtube/issues)MITPHPPHP &gt;=5.6.0

Since Feb 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fomvasss/youtube)[ Packagist](https://packagist.org/packages/fomvasss/youtube)[ RSS](/packages/fomvasss-youtube/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Youtube
=======

[](#youtube)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9da5d020db52e5d4d1eb52464e2cb7576912bf16e3a9b0179fbc7956b69b6036/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666f6d76617373732f796f75747562652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fomvasss/youtube)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/67c40579dfd4cea419c63222ad8e340949c21ba575a9e46f4ab5c8367d6cc687/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666f6d76617373732f796f75747562652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fomvasss/youtube)

Package for generate IFrame with youtube-link

Install
-------

[](#install)

```
composer require "fomvasss/youtube"
```

**For Laravel &lt; 5.5** register the service provider and aliases in config/app.php:

```
  Fomvasss\Youtube\YoutubeServiceProvider::class,
```

Publish config:

```
php artisan vendor:publish --provider="Fomvasss\Youtube\YoutubeServiceProvider" --tag="config"
```

Config
------

[](#config)

Edit file `config/youtube.php`, set:

- 'rel' =&gt; 0, #show like videos after finish
- 'autoplay' =&gt; 0, #autoplay video after open page
- 'loop' =&gt; 0, #if 1 - repeat video
- 'controls' =&gt; 1, #show control button in player
- 'showinfo' =&gt; 1, #show info about video (title, time)
- 'width' =&gt; 640, #width video
- 'height' =&gt; 360, #height video
- 'frameborder' =&gt; 0, #border on player
- 'bootstrap-responsive-embed' =&gt; false, #add bootstrap container with class "embed-responsive"
- 'bootstrap-ratio' =&gt; '16by9', #set default ratio 1by1 | 4by3 | 16by9 | 21by9

Using
-----

[](#using)

### Using facades `Youtube`

[](#using-facades-youtube)

```
use Fomvasss\Youtube\Facades\Youtube;
```

Now example, you can use next:

```
Youtube::iFrame('https://www.youtube.com/watch?v=Dxk47dya8_k'); //returt String iframe
```

You get next iframe:

```

```

You can set more parameters in array:

```
$link = 'https://www.youtube.com/watch?v=Dxk47dya8_k';
Youtube::iFrame($link, ['rel'=> 0, 'autoplay'=>1, 'controls'=>1, 'showinfo'=>1, 'width'=>720, 'height'=>460, 'frameborder'=>0])
```

If are you not set some parameters, it well have default values (with config youtube.php):

### Using blade directive in template`@youtube()`

[](#using-blade-directive-in-templateyoutube)

```
@youtube("https://www.youtube.com/watch?v=Dxk47dya8_k")
@youtube('')
@youtube("Dxk47dya8_k")
```

Also you can set more parameters in array:

```
@youtube('https://www.youtube.com/watch?v=Dxk47dya8_k', ['width'=>720, 'height'=>460,])
```

### Using Bootstrap responsive container

[](#using-bootstrap-responsive-container)

If in config/youtube.php sett `'bootstrap-responsive-embed' => true,` or array parameters is set `'bootstrap-responsive-embed' => true` then we give next:

```

```

Then the parameters `height` &amp; `weight` are not using (ignoring) You also can use `bootstrap-ratio` parameters. Available next value ratio: 1by1 | 4by3 | 16by9 | 21by9

### Using helper-function `youtube_iframe()`

[](#using-helper-function-youtube_iframe)

```
youtube_iframe('https://www.youtube.com/watch?v=Dxk47dya8_k');
```

Other method and API are back here:
-----------------------------------

[](#other-method-and-api-are-back-here)

- [https://developers.google.com/youtube/player\_parameters?hl=ru](https://developers.google.com/youtube/player_parameters?hl=ru)
-

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~114 days

Total

7

Last Release

2896d ago

PHP version history (2 changes)v1.0PHP &gt;=7.0.0

v1.2.1PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f99b460639e7d6871597882226b1e0d9e3055992eac8b22bfcd4f90fbdac95c?d=identicon)[fomvasss](/maintainers/fomvasss)

---

Top Contributors

[![fomvasss](https://avatars.githubusercontent.com/u/19834478?v=4)](https://github.com/fomvasss "fomvasss (8 commits)")

---

Tags

laravelvideoyoutube

### Embed Badge

![Health badge](/badges/fomvasss-youtube/health.svg)

```
[![Health](https://phpackages.com/badges/fomvasss-youtube/health.svg)](https://phpackages.com/packages/fomvasss-youtube)
```

###  Alternatives

[chojnicki/video-platforms-parser

Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.

22226.4k](/packages/chojnicki-video-platforms-parser)[mostafaznv/nova-video

Video Field for Laravel Nova

22398.0k1](/packages/mostafaznv-nova-video)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
