79642192

Date: 2025-05-28 12:30:24
Score: 0.5
Natty:
Report link

Notification Class

$message = (new MailMessage)
            ->subject($this->emailContent['subject'])
            ->line(new HtmlString($this->emailContent['email_body']))
            ->action('Pay Invoice', url('/'))
            ->line('Thank you for using our application!')
            ->attachData(base64_decode($this->pdf), 'invoice.pdf', [
                'mime' => 'application/pdf',
            ]);
        $message->viewData['logo'] = getEmailTemplateLogo($this->invoice->business);
        return $message;
// resources/views/vendor/notifications/email.blade.php
<x-mail::message :logo="$logo">

It works like a charm! No any additional views no any custom coding just a single line and it will do all the work for you.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Dhruv Pandya