locale($this->lang); } /** * Get the message envelope. */ public function envelope(): Envelope { return new Envelope( subject: __('mail.preapplication.subject'), ); } /** * Get the message content definition. */ public function content(): Content { return new Content( view: 'mail.preapplication', with: ['pa' => $this->pa], ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { $langFb = match ($this->locale) { 'de' => 'dk', 'en' => 'ek', default => 'dk', }; $langDonation = match ($this->locale) { 'de' => '', 'en' => '_en', }; return [ Attachment::fromPath(public_path('Dokumente/c3gov_fb5' . $langFb . '.pdf')) ->withMime('application/pdf'), Attachment::fromPath(public_path('Dokumente/C3GovSpGV' . $langDonation . '.pdf')) ->withMime('application/pdf'), ]; } }