2017 © Pedro PelĂĄez
 

library cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

image

leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  • Tuesday, February 13, 2018
  • by leewillis77
  • Repository
  • 1 Watchers
  • 3 Stars
  • 198 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 8 % Grown

The README.md

CachedEmbed

A package for Laravel 5.5+ and above to cache embed information retrieved using the https://github.com/oscarotero/Embed package., (*1)

Treeware

If you use this package in production, we ask that you buy the world some trees to thank us for our work. By contributing to our forest you’ll be creating employment for local families and restoring wildlife habitats., (*2)

We offset our carbon footprint via Ecologi , (*3)

Installation

Add the package to your Laravel project using composer:, (*4)

$ composer require leewillis77/cached-embed

Configuration

You can publish the configuration file using the following artisan command:, (*5)

$ php artisan vendor:publish --provider="Leewillis77\CachedEmbed\CachedEmbedServiceProvider" --tag="config"  

You can change the following values in the configuration file (config/cachedembed.php):, (*6)

  • expiry The default expiry time of cached embed data (in minutes).
  • store The name of cache store to use to store embed data. This must be a valid cache store as defined in config/cache.php

Usage

Simply use CachedEmbed::create instead of Embed::create, e.g, (*7)

<?php

use Leewillis77\CachedEmbed\CachedEmbed;

$data = CachedEmbed::create('https://www.youtube.com/watch?v=dQw4w9WgXcQ');

As with the underlying embed library, you can pass arguments as the second variable, e.g., (*8)

<?php

use Leewillis77\CachedEmbed\CachedEmbed;

$data = CachedEmbed::create(
    'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
    [ 'choose_bigger_image' => true ]
);

The library also supports setting a specific expiry time for individual embeds via a third parameter:, (*9)

<?php

use Leewillis77\CachedEmbed\CachedEmbed;

$data = CachedEmbed::create(
    'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
    [ 'choose_bigger_image' => true ],
    30
);

Treeware

You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree., (*10)

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats., (*11)

You can buy trees here offset.earth/ademtisoftware, (*12)

Read more about Treeware at treeware.earth, (*13)

The Versions

13/02 2018

dev-master

9999999-dev https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache oembed embed

09/02 2018

0.6.0

0.6.0.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache oembed embed

09/02 2018

0.5.0

0.5.0.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache oembed embed

02/02 2018

0.4.0

0.4.0.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed

02/02 2018

0.3.0

0.3.0.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed

02/02 2018

0.2.3

0.2.3.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed

02/02 2018

0.2.2

0.2.2.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed

02/02 2018

0.2.1

0.2.1.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed

02/02 2018

0.2.0

0.2.0.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed

02/02 2018

v0.1.0

0.1.0.0 https://github.com/leewillis77/cached-embed

Laravel 5.5 package to cache embed information from https://github.com/oscarotero/Embed

  Sources   Download

MIT

The Requires

 

laravel cache embed