- Article - 文章 (长图文,小说,漫画)
- Post - 动态 (短视频,短图文)
- Issue - 问题(付费)
- Solution - 解决方案
- Category - Categorizable(内容/用户的) - 分类
- Tag - Taggable(内容/用户的) - 标签
- Collection - Collectable(内容/用户的) - 合集 (短视频动态合集,小说连载,漫画连载)
- haxibiao/media
- haxibiao/cms
- haxibiao/sns
composer.json改动如下: 在repositories中添加 vcs 类型远程仓库指向http://code.haxibiao.cn/packages/haxibiao-content- 执行
composer require haxibiao/content - 执行
php artisan content:install发布包中的资源文件 - 执行
php artisan migrate执行包中的迁移文件 - 完成
Released on 2020-11-24
- 添加位置功能-对象 Location
- 需要执行
composer require saikiran/geohash - 在手动发布视频时,前端需要传入 Location 包含位置信息和经纬度信息
1.3 Released on 2020-09-26
- 能创建合集,可以将动态归类到合集中
- 能搜索合集,合集内能搜索动态 (#f3d21)
- 合集添加集数 (#7358c8, #d86e3)
- 合集&视频&标签能查看真实的播放量 (#58642, #36d27)
- 能利用 H5 分享合集 (#51186, #286b5)
- 采集抖音视频能分发到系统马甲号 (#f0a15b0, #c6ae3)
- 能根据抖音合集信息生成合集 (#3424a, #7988a)
- 移除冗余的任务奖励逻辑 (#3e78f, #c9a0bf)
1.2
Released on 2020-09-11
- 发布采集加入精力点扣除逻辑(#b3d13eb1, #1eb5f125, #326fda41)
- 分享模版可进行配置 (#560dfd4e, #e316924d #38ac327e)
- 修复 class 重复命名 (#ab8c554e)
- Article 模型修复 Image 关系 (#b1f1402c, #824ad122, #ef5bca4a)
- 增加分享链接计数 (#1cffe56d)
1.1
Released on 2020-09-01
- 加入付费问答与抖音视频本地上传
- 增加静态模型绑定,解决子类无法触发父类事件以及 Model 的扩展性问题
- 修复 Video 中的 Width/Height 等属性为 null 的情况
- 修复部分 GQL 语法错误,以及函数命名不规范的问题
- package 中模型加入$guarded 属性,兼容填充数据时字段不一致问题
- Post 中加上了 PostOldPatch Trait 解决工厂 Article Post 的兼容问题,并修复了事件通知
- 为方便工厂系项目集成,加入数据修复脚本
RefactorCategorizable与PostReFactoringCommand完成数据修复 - 剔除冗余的失效路由代码,完成 API 与 GQL 的测试用例补充
远程仓库的 composer package 发生更新时如何进行更新操作呢?
- 执行
composer update haxibiao/content
假设有Article模型:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use \Haxibiao\Content\Traits\Categorizable;
class Article extends Model
{
use Categorizable;
}给 Article 关联新的分类:
<?php
namespace App;
$article = Article::find(1);
$article->addCategories([1, 2, 3, 4, 5]);
return $article;此时,Article模型已经关联了 Category 为1, 2, 3, 4和5
如果需要移除Category和Article之间的关系:
<?php
namespace App;
$article = Article::find(1);
$article->removeCategories([3, 5]);
return $article;此时 Article 模型只关联了 category id 为1,2和4的记录
如果需要重新 syncCategory和Article的关系:
<?php
namespace App;
$article = Article::find(1);
$article->updateCategories([1, 5]);
return $article;Article 模型当前只关联了 category id 为1和5的记录.
GET
api/category/{id}
Any
api/category/{category_id}/videos
POST
api/category/new-logo
| params | must | desc |
|---|---|---|
| api_token | yes | |
| logo | yes | 图片文件 |
POST
api/category/{id}/edit-logo
| params | must | desc |
|---|---|---|
| api_token | yes | |
| logo | yes | 图片文件 |
POST
api/category/{id}
| params | must | desc |
|---|---|---|
| api_token | yes | |
| name | no | |
| ... | no |
待补充...