*/ class MaildispatcherFactory extends Factory { public $model = Maildispatcher::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'name' => Str::slug($this->faker->words(3, true)), ]; } public function filter(FilterScope $filter): self { return $this->state([ 'filter' => $filter->toArray(), ]); } }