settings = app(InvoiceSettings::class); $this->bodyText = $this->bodyText ->replaceWithList('wanted', collect($preventable->preventions())->map(fn ($prevention) => $prevention->text())->toArray()); } /** * Get the message envelope. * * @return \Illuminate\Mail\Mailables\Envelope */ public function envelope() { return (new Envelope( subject: $this->preventable->preventableSubject(), ))->to($this->preventable->getMailRecipient()->email, $this->preventable->getMailRecipient()->name); } /** * Get the message content definition. * * @return \Illuminate\Mail\Mailables\Content */ public function content() { return new Content( markdown: $this->preventable->preventableLayout(), ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }