PHPackages                             jorarmarfin/laravel\_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. [API Development](/categories/api)
4. /
5. jorarmarfin/laravel\_youtube

ActiveLibrary[API Development](/categories/api)

jorarmarfin/laravel\_youtube
============================

Get the information from a YouTube video

0.0.4(6y ago)09MITPHPPHP &gt;=5.6.4CI failing

Since Feb 7Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laravel 6.0 Youtube
===================

[](#laravel-60-youtube)

[![Latest Stable Version](https://camo.githubusercontent.com/c027e81b2a8ffb726048835b641397d59eb25d8bb26d6cb26a90197be31645c0/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7261726d617266696e2f6c61726176656c5f796f75747562652f762f737461626c65)](https://packagist.org/packages/jorarmarfin/laravel_youtube) [![Total Downloads](https://camo.githubusercontent.com/72880e5c86e86520608961fd677098e1a82b009cab709304150ec6283a668b49/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7261726d617266696e2f6c61726176656c5f796f75747562652f646f776e6c6f616473)](https://packagist.org/packages/jorarmarfin/laravel_youtube) [![Latest Unstable Version](https://camo.githubusercontent.com/57542bd6aeff8db815f5f6e01e87d190129dee1fe805da5ee4fc47f019f59fee/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7261726d617266696e2f6c61726176656c5f796f75747562652f762f756e737461626c65)](https://packagist.org/packages/jorarmarfin/laravel_youtube) [![License](https://camo.githubusercontent.com/4126be5ac3b02444e1c517563c0bdbf0214dfbaf78a74c1d2267ee0f7f2c93df/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7261726d617266696e2f6c61726176656c5f796f75747562652f6c6963656e7365)](https://packagist.org/packages/jorarmarfin/laravel_youtube)A simple way to show the metadata of a YouTube video in [Laravel](http://www.laravel.com)

Installation
------------

[](#installation)

The LaravelYoutube service provider can be installed via [composer](http://getcomposer.org) by requiring the `jorarmarfin/laravel_youtube` package in your project's composer.json.

Laravel 5.5+ will use the auto-discovery function.

```
{
    "require": {
        "jorarmarfin/laravel_youtube": "0.0.2"
    }
}
```

If you don't use auto-discovery you will need to include the service provider / facade in `config/app.php`.

```
'providers' => [
    //...
    JorarMarfin\LaravelYoutube\LaravelYoutubeServiceProvider::class,
]

//...

'aliases' => [
    //...
    'LaravelYoutube' => JorarMarfin\LaravelYoutube\Facades\LaravelYoutubeFacade::class
]
```

That's it! You're good to go.

Here is a little example:

```
use LaravelYoutube; // at the top of the file

$data = LaravelYoutube::getData('https://www.youtube.com/watch?v=cYgkfQUUwWQ');
$data is object
+"thumbnail_url": "https://i.ytimg.com/vi/cYgkfQUUwWQ/hqdefault.jpg"
  +"version": "1.0"
  +"type": "video"
  +"html": "
