2017 © Pedro Peláez
 

library embed

Media Embed (for Laravel or as a standalone).

image

cohensive/embed

Media Embed (for Laravel or as a standalone).

  • Wednesday, May 16, 2018
  • by KaneCohen
  • Repository
  • 3 Watchers
  • 49 Stars
  • 44,046 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 0 Open issues
  • 25 Versions
  • 11 % Grown

The README.md

New Version

If you're running PHP 8+ I highly recommend using new version of the library: OEmbed.
It has more features while still working almost the same way as this one., (*1)

Embed

Generate media html (YouTube, Vimeo, Kickstarter etc.) based on the url., (*2)

Installation

Add following require to your composer.json file:, (*3)

For Laravel 5:, (*4)

    "cohensive/embed": "dev-master"
    // or
    "cohensive/embed": "5.5.*"

For Laravel 4:, (*5)

    "cohensive/embed": "4.3.*"

Then run composer install or composer update to download it and autoload., (*6)

In providers array you need to add new package:, (*7)

'providers' => array(

    //...
    'Cohensive\Embed\EmbedServiceProvider',
    //...

)

In aliases:, (*8)

'aliases' => array(

    //...
    'Embed' => 'Cohensive\Embed\Facades\Embed'
    //...

)

Usage

$embed = Embed::make('http://youtu.be/uifYHNyH-jA')->parseUrl();
// Will return Embed class if provider is found. Otherwie will return false - not found. No fancy errors for now.
if ($embed) {
    // Set width of the embed.
    $embed->setAttribute(['width' => 600]);

    // Print html: '<iframe width="600" height="338" src="//www.youtube.com/embed/uifYHNyH-jA" frameborder="0" allowfullscreen></iframe>'.
    // Height will be set automatically based on provider width/height ratio.
    // Height could be set explicitly via setAttr() method.
    echo $embed->getHtml();
}

The Versions

16/05 2018

dev-master

9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

16/05 2018

v5.5.0

5.5.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

17/01 2018

4.4.x-dev

4.4.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

17/01 2018

v4.4.1

4.4.1.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

17/01 2018

5.4.x-dev

5.4.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

17/01 2018

v5.4.1

5.4.1.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

22/10 2017

4.3.x-dev

4.3.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

22/10 2017

v4.4.0

4.4.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

22/10 2017

v5.4.0

5.4.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

17/11 2016

v4.3.3

4.3.3.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

17/11 2016

v5.3.1

5.3.1.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

08/11 2016

v4.3.2

4.3.2.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

08/11 2016

5.3.x-dev

5.3.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

08/11 2016

5.3

5.3.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

09/08 2016

v4.3.1

4.3.1.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

05/04 2016

v4.3.0

4.3.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

05/04 2016

5.2.x-dev

5.2.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

05/04 2016

v5.2.0

5.2.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel media youtube vimeo embed

11/09 2015

v5.1.0

5.1.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

06/02 2015

5.0.x-dev

5.0.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

06/02 2015

v5.0.0

5.0.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

15/01 2015

4.2.x-dev

4.2.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

15/01 2015

v4.2.0

4.2.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

11/12 2013

4.0.x-dev

4.0.9999999.9999999-dev

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed

11/12 2013

4.0.0

4.0.0.0

Media Embed (for Laravel or as a standalone).

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Kane Cohen

laravel media youtube vimeo embed