moving to provider stored in database
This commit is contained in:
@@ -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,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user