Add first-class hosting subdomain create/attach in Domains panel.
Deploy Ladill Hosting / deploy (push) Successful in 1m9s

Customers can create label-based subdomains under primary/addon sites with a separate max_domains×5 quota, nginx/docroot/SSL provisioning, and managed DNS A records when Ladill controls the parent zone.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-13 12:08:41 +00:00
co-authored by Cursor
parent c12c1cf7c3
commit 460edb8719
10 changed files with 723 additions and 11 deletions
+34
View File
@@ -151,6 +151,40 @@ class PowerDnsClient
return ['status' => 'updated', 'count' => count($rrsets)];
}
/**
* Delete specific name+type rrsets from an existing zone (best-effort).
*
* @param string $zoneName
* @param array<int, array{name: string, type?: string}> $records
*/
public function deleteRecords(string $zoneName, array $records): array
{
if ($records === []) {
return ['status' => 'noop'];
}
$zoneName = rtrim($zoneName, '.').'.';
$rrsets = array_map(function (array $record): array {
return [
'name' => rtrim($record['name'], '.').'.',
'type' => strtoupper($record['type'] ?? 'A'),
'changetype' => 'DELETE',
'records' => [],
];
}, $records);
$response = $this->httpClient()->patch("servers/{$this->server()}/zones/{$zoneName}", [
'rrsets' => $rrsets,
]);
if ($response->failed() && $response->status() !== 404) {
$response->throw();
}
return ['status' => 'deleted', 'count' => count($rrsets)];
}
public function deleteZone(Domain $domain): void
{
$zoneName = $this->zoneName($domain);