*/ class ProviderFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => 'keystone', 'type' => $this->faker->randomElement([ ProviderType::HETZNER, ]), 'token' => $this->faker->uuid(), ]; } public function forOrganisation($organisationId): static { return $this->state(fn (array $attributes) => [ 'organisation_id' => $organisationId, ]); } }