*/ class ProviderCredentialFactory extends Factory { protected $model = ProviderCredential::class; public function definition(): array { return [ 'provider_connection_id' => ProviderConnection::factory()->dedicated(), 'type' => 'client_secret', 'credential_kind' => ProviderCredentialKind::ClientSecret->value, 'source' => ProviderCredentialSource::DedicatedManual->value, 'last_rotated_at' => now(), 'expires_at' => now()->addYear(), 'payload' => [ 'client_id' => fake()->uuid(), 'client_secret' => fake()->sha1(), ], ]; } public function legacyMigrated(): static { return $this->state(fn (): array => [ 'source' => ProviderCredentialSource::LegacyMigrated->value, 'last_rotated_at' => null, 'expires_at' => null, ]); } }