mercredi 21 novembre 2018

copy record with all relations laravel 5.4

i have to copy a record from db I am trying this

$new_p = $p->replicate();
   $new_p->save();

but Its not saved P model has many relations i dont know how to copy all !



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire