PHPackages                             haxibiao/media - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. haxibiao/media

ActiveProject

haxibiao/media
==============

哈希表 media

v1.0.1(5y ago)32492MITJavaScriptPHP &gt;=7.3

Since Feb 24Pushed 4y ago2 watchersCompare

[ Source](https://github.com/haxibiao/haxibiao-media)[ Packagist](https://packagist.org/packages/haxibiao/media)[ RSS](/packages/haxibiao-media/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (7)Versions (6)Used By (0)

haxibiao/media
==============

[](#haxibiaomedia)

> haxibiao/media 是哈希表内部媒体资源库

- Image 图片
- Video 视频
- Movie 影视(长视频)

导语
--

[](#导语)

### 1. 新增长视频能力

[](#1-新增长视频能力)

- movie:push 提交长视频内容到云(哈希云，内涵云)
- movie:sync 从云同步长视频内容

### 2. 内容系统增加媒体特性

[](#2-内容系统增加媒体特性)

- trait WithMedia

### 3. 用户系统增加媒体特性

[](#3-用户系统增加媒体特性)

- trait UseMedia

安装步骤
----

[](#安装步骤)

1. `composer.json`改动如下：在`repositories`中添加 vcs 类型远程仓库指向`http://code.haxibiao.cn/packages/haxibiao-media`
2. 执行`composer require haxibiao/media`
3. 执行`php artisan media:install && composer dump`
4. 给 app/User.php 添加 use UseMedia
5. 执行`php artisan migrate`
6. 完成

artisan 命令说明
------------

[](#artisan-命令说明)

- php artisan movie:sync --help (暂时需要配置内部 DB\_HOST\_MEDIACHAIN, DB\_PASSWORD\_MEDIA)
- php artisan video:sync --help (暂时需要配置内部 DB\_HOST\_MEDIA, DB\_PASSWORD\_MEDIA)

### 更新前端

[](#更新前端)

1. 直接使用的 php artisan media:publish
2. 开发模式的 编译前端， cd {vendor\_media} &amp;&amp; npm run prod

### 更新日志

[](#更新日志)

### **1.2**

[](#12)

#### *Released on 2020-09-11*

[](#released-on-2020-09-11)

- 修复 VOD 签名路由 ([\#bc8b5ae6](http://code.haxibiao.cn/packages/haxibiao-media/commit/bc8b5ae69ff17885ed1236f8dd53316fc2545c47))
- 修复 image path 与 model 重名导致 nova 报错 ([\#ea9fc9eb](http://code.haxibiao.cn/packages/haxibiao-media/commit/ea9fc9eb6aac8fc419b88322496b9da29c8f56a5))

### **1.1**

[](#11)

#### *Released on 2020-09-01*

[](#released-on-2020-09-01)

- 修复 Api 路由注册失效的问题
- 为完成抖音无水印采集,提供接口能根据 hash 值获取视频的 qcvod\_fileid
- 图片与模型的关系改为多态多对多
- 为方便工厂系项目集成,加入数据修复脚本 `ImageReFactoringCommand` 完成数据修复
- 为了减少回调,数据库保存抖音采集的信息
- 增加静态模型绑定,解决子类无法触发父类事件以及 Model 的扩展性问题

### 如何完成更新？

[](#如何完成更新)

> 远程仓库的 composer package 发生更新时如何进行更新操作呢？

1. 执行`composer update haxibiao/media`
2. 执行`php artisan media:install`

GQL 接口说明
--------

[](#gql-接口说明)

graphql 部分代码还没统一... install 之后需要自行维护

Api 接口说明
--------

[](#api-接口说明)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~73 days

Total

5

Last Release

1613d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aeb8d51af85edddb5e917a684ab64740e6de80c109a0e5b84184b8fb7a097500?d=identicon)[ivanzhang2](/maintainers/ivanzhang2)

---

Top Contributors

[![wuxiuzhang](https://avatars.githubusercontent.com/u/70505297?v=4)](https://github.com/wuxiuzhang "wuxiuzhang (277 commits)")[![ivanzhang2](https://avatars.githubusercontent.com/u/13308603?v=4)](https://github.com/ivanzhang2 "ivanzhang2 (200 commits)")[![caizhigang1997](https://avatars.githubusercontent.com/u/36915614?v=4)](https://github.com/caizhigang1997 "caizhigang1997 (138 commits)")[![haxifang-aircos](https://avatars.githubusercontent.com/u/61681123?v=4)](https://github.com/haxifang-aircos "haxifang-aircos (25 commits)")[![XiaoXinMing](https://avatars.githubusercontent.com/u/39290488?v=4)](https://github.com/XiaoXinMing "XiaoXinMing (23 commits)")[![yangliu9494](https://avatars.githubusercontent.com/u/40386628?v=4)](https://github.com/yangliu9494 "yangliu9494 (5 commits)")[![PBK-B](https://avatars.githubusercontent.com/u/39079814?v=4)](https://github.com/PBK-B "PBK-B (1 commits)")

### Embed Badge

![Health badge](/badges/haxibiao-media/health.svg)

```
[![Health](https://phpackages.com/badges/haxibiao-media/health.svg)](https://phpackages.com/packages/haxibiao-media)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
