Git Product home page Git Product logo

embedcreator's Introduction

HTML Embed Creator Package For Laravel

Laravel package to create HTML embed code using URL only
Supports Facebook, Youtube, Instagram, Twitter, Vimeo and Dailymotion

Installing.

Via Composer
composer require mraafatcode/embedcreator
After you have installed Package, open your Laravel config file config/app.php and add the following lines.
In the $providers array add the service providers for this package.
MraafatCode\EmbedCreator\Providers\EmbedCreatorProvider::class
Add the facade of this package to the $aliases array.
'EmbedCreator' => MraafatCode\EmbedCreator\EmbedCreator::class,

How to use it?

By use class EmbedCreator and pass url to url() then pass maxWidth() in pixels(px) then embed type function at end use get().

Embed type functions

youtube() facebook() instagram() twitter() vimeo() dailymotion()

Note!

You can create embed without set the max width so the code will run with default width.

Examples

// $url = "VIDEO_URL"
$youtuebEmbed = EmbedCreator::url($url)->maxWidth(560)->youtube()->get();
// $url = "VIDEO_URL"
$VimeoEmbed = EmbedCreator::url($url)->maxWidth(600)->vimeo()->get();
// $url = "VIDEO_URL"
$dailymotionEmbed = EmbedCreator::url($url)->maxWidth(600)->dailymotion()->get();
// $url = "TWEET_URL"
$twitterEmbed = EmbedCreator::url($url)->maxWidth(450)->twitter()->get();
// $url = "VIDEO_OR_IMAGE_URL"
$instagramEmbed = EmbedCreator::url($url)->instagram()->get();
// $url = "POST_URL"
$facebookEmbed = EmbedCreator::url($url)->facebook()->get();

embedcreator's People

Contributors

mraafatcode avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.