Brand patient emails with organization logo.
Deploy Ladill Care / deploy (push) Successful in 54s

Wrap Bird patient mail in a customer-branded layout and show the logo preview in settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-12 20:07:34 +00:00
co-authored by Cursor
parent 6c14c3802c
commit 6c8a0e7e9f
5 changed files with 176 additions and 4 deletions
+23
View File
@@ -47,4 +47,27 @@ class OrganizationBranding
Storage::disk('public')->delete($organization->logo_path);
}
}
public static function emailLogoUrl(Organization $organization): ?string
{
if (! self::hasCustomLogo($organization)) {
return null;
}
$ext = strtolower(pathinfo($organization->logo_path, PATHINFO_EXTENSION));
if ($ext === 'svg') {
return null;
}
$version = $organization->updated_at?->getTimestamp() ?? time();
return Storage::disk('public')->url($organization->logo_path).'?v='.$version;
}
public static function wrapEmailHtml(string $bodyHtml, Organization $organization): string
{
return view('email.customer-branded', [
'logoUrl' => self::emailLogoUrl($organization),
'companyName' => $organization->name,
'bodyHtml' => $bodyHtml,
])->render();
}
}