Kontakt: Hub-Domain-Anfragen gehen an die pressekonto-Brand-Adresse
Der WebPortalContext kennt nur die beiden Spokes - Anfragen von pressekonto.test waeren sonst bei businessportal24 gelandet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
38d7cca086
commit
88d6935014
2 changed files with 21 additions and 1 deletions
|
|
@ -52,7 +52,13 @@ class ContactController extends Controller
|
|||
|
||||
private function recipient(): string
|
||||
{
|
||||
$brand = WebPortalContext::fromRequest()->domainConfig['brand'] ?? [];
|
||||
// Auch die Hub-Domain (pressekonto) nutzt das Formular — sie ist kein
|
||||
// Spoke-Portal, daher vor dem WebPortalContext am Host unterscheiden.
|
||||
if (str_contains(request()->getHost(), 'pressekonto')) {
|
||||
$brand = config('domains.domains.pressekonto.brand', []);
|
||||
} else {
|
||||
$brand = WebPortalContext::fromRequest()->domainConfig['brand'] ?? [];
|
||||
}
|
||||
|
||||
return $brand['contact_email'] ?? config('mail.from.address');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue