Laravel allows to insert multiple rows passing as array of array rows to be inserted
https://laravel.com/docs/5.5/queries#inserts
DB::table('users')->insert([
['email' => 'taylor@example.com', 'votes' => 0],
['email' => 'dayle@example.com', 'votes' => 0]
]);
Is there any alternative to do the same with update?
DB::table('users')->update[
[update to record 1],
[update to record 2]
];
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire