Model traits

Version Date Notes By
0.1 2016-10-22 Initial release (Clonable trait) ROB

Clonable

This trait allows the model to be cloned recursively. You can load a model from the database and load the relations you wish to clone, call the deepClone function and a new model will be created with a copy of all the loaded relations.

$newModel = $oldModel->deepClone(['relation','relation.subRelation']);