Show linked domains on cards and fix Email leftovers.
Deploy Ladill Hosting / deploy (push) Successful in 24s

Display hosted_sites on account cards, scope Afia and Settings to hosting,
add hosting_settings for notifications, and remove mailbox UI from the
hosting layout and account pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-06 17:30:40 +00:00
co-authored by Cursor
parent c4bd4efbed
commit 5703a00862
19 changed files with 202 additions and 329 deletions
+20
View File
@@ -135,6 +135,26 @@ class HostingAccount extends Model
return $this->hasMany(HostedSite::class);
}
/** Primary label for UI lists — prefers linked hosted_sites over primary_domain. */
public function linkedDomainLabel(): ?string
{
if ($this->relationLoaded('sites') && $this->sites->isNotEmpty()) {
$domains = $this->sites->pluck('domain')->filter()->unique()->values();
if ($domains->count() === 1) {
return (string) $domains->first();
}
$preview = $domains->take(2)->implode(', ');
return $domains->count() > 2
? "{$preview} +".($domains->count() - 2)
: $preview;
}
return filled($this->primary_domain) ? (string) $this->primary_domain : null;
}
public function databases(): HasMany
{
return $this->hasMany(HostedDatabase::class);