acceptance = $acceptance; $this->recipient = $recipient; $this->wasAccepted = $wasAccepted; } /** * Get the message envelope. */ public function envelope(): Envelope { $subject = $this->wasAccepted ? trans('mail.initiated_accepted') : trans('mail.initiated_declined'); return new Envelope( subject: $subject, ); } /** * Get the message content definition. */ public function content(): Content { return new Content( markdown: 'mail.markdown.checkout-acceptance-response', with: [ 'assignedTo' => $this->acceptance->assignedTo, 'introduction' => $this->introduction(), 'item' => $this->acceptance->checkoutable, 'note' => $this->acceptance->note, 'recipient' => $this->recipient, ] ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } private function introduction(): string { return $this->wasAccepted ? trans('mail.following_accepted') : trans('mail.following_declined'); } }