dimanche 19 septembre 2021

Return Model of Newly created Multiple records

I need to get the model of newly created records

$data = [['name' => 'john'], ['name' => 'Doe']];
$result = Model::insert($data);

But when I checked the $result variable it was Boolean.

How can I get the newly created records?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3ziQtsA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire