Provides a custom Laravel Blade directive to embed anything in the view using the Embed\Embed package.

1.1 2016-07-10 09:09 UTC

This package is not auto-updated.

Last update: 2024-06-08 18:00:01 UTC


Latest Stable Version Codacy Badge Total Downloads License

Laravel Embed Directives

This package lets Laravel users embed any social media link in the views using a simple blade command. To install and use the package, complete the simple steps that are following.

To install the package:

  1. Open your terminal
  2. Navigate to your project's directory source path
  3. Enter the following command

composer require siokas/laravelembeddirectives

To get access to the package:

  1. Go to your project's folder and open the config/app.php file
  2. Navigate to the providers section and add the following line


To use the package:

  1. In any Blade file use the embed command



  • If you want to specify the width and height of the embed post, just pass them as parameters like this:

@embed('', 500, 500)

Available Directives

@embed('LINK-GOES-HERE') // for general use

ex. @twitter('taylorotwell') This code embeds the public profile of a user, but you can embed a specific tweet giving the id of the tweet. (ex. taylorotwell/status/751184223445381120)

Within the @youtube directive, you have to enter the link to the video but only the part after the watch?


Embed package: oscarotero/Embed

License (MIT)

The MIT License (MIT) Copyright (c) 2016 Apostolos Siokas