moving to provider stored in database

This commit is contained in:
2025-04-07 14:38:28 +01:00
parent 6bd12bd6ca
commit b800a9d83a
11 changed files with 100 additions and 14 deletions

View File

@@ -20,8 +20,6 @@ class ServerFactory extends Factory
{
return [
'name' => $this->faker->word(),
'provider' => ServerProvider::HETZNER,
'provider_id' => $this->faker->uuid(),
'ipv4' => $this->faker->ipv4(),
'ipv6' => $this->faker->ipv6(),
'provider_status' => '',
@@ -41,4 +39,13 @@ class ServerFactory extends Factory
];
});
}
public function forProvider(string $providerId): static
{
return $this->state(function (array $attributes) use ($providerId) {
return [
'provider_id' => $providerId,
];
});
}
}