If you want to create multiple records using Factory without firing any Events, you can wrap your code inside a withoutEvents closure.
$posts = Post::withoutEvents(function () {
return Post::factory()->count(50)->create();
});
If you want to create multiple records using Factory without firing any Events, you can wrap your code inside a withoutEvents closure.
$posts = Post::withoutEvents(function () {
return Post::factory()->count(50)->create();
});