Open kwazaro opened 5 years ago
I have model with attachments:
$model = Page::findOne($id);
I want to duplicate this model and all it's attachments:
$newModel = new Page(); $newModel->setAttributes($model->attributes); $newModel->save();
How to deal with attachments here?
I have model with attachments:
I want to duplicate this model and all it's attachments:
How to deal with attachments here?