improved hetzner features

This commit is contained in:
Andras Bacsai
2025-10-09 12:53:57 +02:00
parent c9e6418542
commit 704ddf2968
17 changed files with 514 additions and 199 deletions

View File

@@ -17,6 +17,16 @@ class CloudProviderToken extends Model
return $this->belongsTo(Team::class);
}
public function servers()
{
return $this->hasMany(Server::class);
}
public function hasServers(): bool
{
return $this->servers()->exists();
}
public static function ownedByCurrentTeam(array $select = ['*'])
{
$selectArray = collect($select)->concat(['id']);