TIP 07 / 08

Run Factories without Dispatching Events.

If you want to create multiple records using Factory without firing any Events, you can wrap your code inside a withoutEvents closure.

php
$posts = Post::withoutEvents(function () {
    return Post::factory()->count(50)->create();
});