Download the PHP package mariusz-buk/files-replicator without Composer
On this page you can find all versions of the php package mariusz-buk/files-replicator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mariusz-buk/files-replicator
More information about mariusz-buk/files-replicator
Files in mariusz-buk/files-replicator
Download mariusz-buk/files-replicator
More information about mariusz-buk/files-replicator
Files in mariusz-buk/files-replicator
Vendor mariusz-buk
Package files-replicator
Short Description OctoberCMS FilesReplicator trait used when replicating any model with files
License GPL-3.0-or-later
Package files-replicator
Short Description OctoberCMS FilesReplicator trait used when replicating any model with files
License GPL-3.0-or-later
Please rate this library. Is it a good library?
Informations about the package files-replicator
Files replicator for OctoberCMS
OctoberCMS FilesReplicator trait used when replicating any model with files.
How to use
- Run
composer require "mariusz-buk/files-replicator"
- Define model's properties
$attachOne
and/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.
All versions of files-replicator with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0
The package mariusz-buk/files-replicator contains the following files
Loading the files please wait ....