*/ class AlertDestinationFactory extends Factory { protected $model = AlertDestination::class; public function definition(): array { return [ 'workspace_id' => Workspace::factory(), 'name' => 'Destination '.fake()->unique()->word(), 'type' => AlertDestination::TYPE_TEAMS_WEBHOOK, 'is_enabled' => true, 'config' => [ 'webhook_url' => 'https://example.invalid/'.fake()->uuid(), ], ]; } public function email(): static { return $this->state(fn (): array => [ 'type' => AlertDestination::TYPE_EMAIL, 'config' => [ 'recipients' => [ fake()->safeEmail(), ], ], ]); } }