*/ public array $portalLinks; /** * Name für die Anrede — bei API-Einlieferungen der Pressekontakt bzw. * die Firma, nie der Kontoname des API-Einlieferers. */ public string $recipientName; public function __construct( public readonly User $user, public readonly PressRelease $pressRelease, ?string $recipientName = null, ) { $this->recipientName = $recipientName ?? $user->name; $this->showUrl = $user->canAccessAdmin() ? route('admin.press-releases.show', $pressRelease->id) : route('me.press-releases.show', $pressRelease->id); $this->portalLinks = $pressRelease->publicPortalLinks(); $this->configureUnsubscribe($user, EmailNotificationType::PressReleasePublished); } public function envelope(): Envelope { return new Envelope( subject: 'Ihre Pressemitteilung wurde veröffentlicht: '.$this->pressRelease->title, ); } public function content(): Content { return new Content(view: 'emails.press-release.published'); } }