I'm trying to copy a row using by replicate() method:
$doc = Doc::find(64618);
$newdoc = $doc->replicate();
$newdoc->Price= 9999;
$newdoc->save();
but this table contains several computed columns and I get an error that the data fields can not be updated. How can I exclude these fields when using replicate()?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MPyNkX
via IFTTT
Aucun commentaire:
Enregistrer un commentaire