Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel createmany example

$post = Post::find(1);

$post->comments()->createMany([
    ['message' => 'A new comment.'],
    ['message' => 'Another new comment.'],
]);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #createmany
ADD COMMENT
Topic
Name
1+9 =