Download the PHP package webwizardsusa/laravel-oembed without Composer

On this page you can find all versions of the php package webwizardsusa/laravel-oembed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-oembed

OEmbed For Laravel

(NOTE: This package is in early development.)

This package allows you to retrieve embed information for URLs from various oembed providers, similar to Wordpress. Out of the box, we support the following websites:

Providers can be disabled inside the configuration. Adding of additional providers is a rather simple process. See below.

Installation

You can install the package via composer:

Responsive Iframe CSS

This package makes responsive IFrames possible. To enabled them on your site, you need to add the following CSS to your site:

Configuration publishing

If you wish to alter the list of providers, or adjust any other configuration values, then you can publish the configuration with:

The following configuration values are available:

Config Env Default Description
providers - array An array of enabled provider classes
cache.enabled OEMBED_ENABLE_CACHE true Enables caching of responses
cache.ttl OEMBED_URL_CACHE_TTL 10080 The number of minutes to cache successful responses
cache.invalid_ttl OEMBED_INVALID_URL_CACHE_TTL 10 The number of minutes to cache invalid responses
cachek.key_prefix OEMBED_CACHE_PREFIX oembedurl A prefix to attach to the key of all cached items
cache.driver OEMBED_CACHE_DRIVER null The cache driver to use

Usage

Usage is very simple. Just utilize the OEmbed service to retrieve information about a URL.

Running that will result in the following output:

The fromUrl() method will return a OEmbedResponse if successful, or null if not successful.

You can also render the embed from the OEmbedResponse by calling the render() method. Rending is done through views. Each provider decides which view to use, html, iframe or responsive-iframe.

Providers

For the most part providers are very simple classes:

A simple array of regex patterns to match the URL, then the url of that services oembed service. While this works for a majority of the providers, sometimes you may need to extend how information is retrieved. To do that, you can override pull() on the provider class:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

This package is developed by WebWizardsUSA.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-oembed with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/contracts Version ^10.0|^11.0
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webwizardsusa/laravel-oembed contains the following files

Loading the files please wait ...