siokas/laravelembeddirectives
最新稳定版本:1.1
Composer 安装命令:
composer require siokas/laravelembeddirectives
包简介
Provides a custom Laravel Blade directive to embed anything in the view using the Embed\Embed package.
README 文档
README
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:
- Open your terminal
- Navigate to your project's directory source path
- Enter the following command
composer require siokas/laravelembeddirectives
To get access to the package:
- Go to your project's folder and open the config/app.php file
- Navigate to the providers section and add the following line
Siokas\LaravelEmbedDirectives\LaravelEmbedDirectivesServiceProvider::class
To use the package:
- In any Blade file use the embed command
@embed('your-link-goes-here')
Option:
- If you want to specify the width and height of the embed post, just pass them as parameters like this:
@embed('https://www.youtube.com/watch?v=g4BbeHYCR1E', 500, 500)
Available Directives
@embed('LINK-GOES-HERE') // for general use
@youtube('LINK-GOES-HERE')
@youtubeProfile('LINK-GOES-HERE')
@vimeo('LINK-GOES-HERE')
@twitter('LINK-GOES-HERE')
@facebook('LINK-GOES-HERE')
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?
Requirements
Embed package: oscarotero/Embed
License (MIT)
The MIT License (MIT) Copyright (c) 2016 Apostolos Siokas
统计信息
- 总下载量: 97
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-09