📜  laravel createmany 示例 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:47.334000             🧑  作者: Mango

代码示例1
$post = Post::find(1);

$post->comments()->createMany([
    ['message' => 'A new comment.'],
    ['message' => 'Another new comment.'],
]);