multiple updates in single query laravel code example
Example: update many laravel
$post->comments()->updateMany([
[
'message' => 'A new comment.',
],
[
'message' => 'Another new comment.',
],
]);
$post->comments()->updateMany([
[
'message' => 'A new comment.',
],
[
'message' => 'Another new comment.',
],
]);