nwidart/laravel-videoable
Composer 安装命令:
composer require nwidart/laravel-videoable
包简介
Attach videos to your models
README 文档
README
| Laravel | laravel-videoable |
|---|---|
| <= 5.4 | ^1.0 |
| 5.5 | ^2.0 |
| 5.7 | ^3.0 |
Laravel Videoable is a quick and easy way to add a video to your Eloquent Models. It also features a way to generate the embed code directly.
$product = Product::create(['product_name' => 'something']); $product->addVideo([ 'source' => 'youtube', 'code' => '123', 'title' => 'my video', 'width' => 50, 'height' => 150, ]); // Get the embeddable code $product->video->getEmbed(); // Returns <div> <div class="video"> <iframe id="ytplayer" type="text/html" width="100%" height="100%" src="https://www.youtube.com/embed/123?rel=0" frameborder="0" allowfullscreen></iframe> </div> </div>
Install
Via Composer
$ composer require nwidart/laravel-videoable
Next add the following service provider in config/app.php.
'providers' => [ Nwidart\LaravelVideoable\LaravelVideoableServiceProvider::class, ],
Publish the package's migrations files by running :
php artisan vendor:publish --provider="Nwidart\LaravelVideoable\LaravelVideoableServiceProvider" --tag=migrations
After the migrations have been published you can create the laravel_videoables table by running the migrations
php artisan migrate
(optional) Publish the package's configuration file by running :
php artisan vendor:publish --provider="Nwidart\LaravelVideoable\LaravelVideoableServiceProvider" --tag=config
(optional) Publish the package's view files by running :
php artisan vendor:publish --provider="Nwidart\LaravelVideoable\LaravelVideoableServiceProvider" --tag=views
Documentation
You'll find installation instructions and full documentation on https://nwidart.com/laravel-videoable/.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email n.widart@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
nwidart/laravel-videoable 适用场景与选型建议
nwidart/laravel-videoable 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 117 次下载、GitHub Stars 达 18, 最近一次更新时间为 2017 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「youtube」 「vimeo」 「video」 「laravel」 「laravel-videoable」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nwidart/laravel-videoable 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nwidart/laravel-videoable 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nwidart/laravel-videoable 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP helper for embedding YouTube and Vimeo videos
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
The yii2-videojs-widget is a Yii 2 wrapper for the [video.js](http://www.videojs.com/). A JavaScript and CSS library that makes it easier to work with and build on HTML5 video. This is also known as an HTML5 Video Player.
♺ Laravel Nova Hashids card. Convert your ids.
Display a video using native HTML5 video
Fetch embeddable links from text and fetch OpenGraph data.
统计信息
- 总下载量: 117
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-21