mariusz-buk/files-replicator
Composer 安装命令:
composer require mariusz-buk/files-replicator
包简介
OctoberCMS FilesReplicator trait used when replicating any model with files
README 文档
README
OctoberCMS FilesReplicator trait used when replicating any model with files.
How to use
- Run
composer require "mariusz-buk/files-replicator" - Define model's properties
$attachOneand/or$attachMany. - Add
use FilesReplicator\FilesReplicatorTrait;to your model class. - For replicating model use
$newModel = $oldModel->replicate(). That's all. - If you want update existing model with files from other model (of the same class) use
$myModel->replicateFilesFrom($otherModel).
About this code
I found it would be useful to replicate files when we replicate model. I saw more coders looked for solution so here it is. I hope you'll find it easy to use.
Any questions/suggestions are welcome.
I provide commercial support for your projects.
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2018-10-20