Answers for "laravel createmany example"

PHP
1

laravel createmany example

$post = Post::find(1);

$post->comments()->createMany([
    ['message' => 'A new comment.'],
    ['message' => 'Another new comment.'],
]);
Posted by: Guest on July-15-2021

Browse Popular Code Answers by Language