Is there a more elegant way to do the following in Lavarel 5?
MyModel::create([
'my_other_model_id' => $my_other_model->id,
'my_other_other_model_id' => $my_other_other_model->id,
]);
I'd like to pass $my_other_model
and $my_other_other_model
in directly without all that tedious mucking about with id
s.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire