participant->event()->first()->name ), ); } public function content(): Content { $event = $this->participant->event()->first(); return new Content( view: 'emails.events.refund_accepted', with: [ 'name' => $this->participant->getNicename(), 'eventTitle' => $event->name, 'eventEmail' => $event->email, 'amount' => $this->refund->amount?->toString() ?? '0,00 Euro', 'reason' => $this->refund->reasonLabel(), 'accountOwner' => $this->refund->account_owner, 'accountIban' => Iban::format((string) $this->refund->account_iban), 'hasDocument' => $this->pdfContent !== null, ], ); } /** * @return array */ public function attachments(): array { if ($this->pdfContent === null) { return []; } return [ Attachment::fromData(fn (): string => $this->pdfContent, $this->pdfFilename ?? 'Rueckerstattung.pdf') ->withMime('application/pdf'), ]; } }