stickerPath = $stickerPath; $this->ticketPath = $ticketPath; $this->barcodePath = $barcodePath; $this->participation = $participation; $this->crmCustomer = $crmCustomer; $this->settings = $settings; } /** * Build the message. * * @return $this */ public function build() { $participation = $this->participation; $customer = $this->customer; $subject = ''; if (!collect($this->to)->count()) { $this->to(config('mail.MAIL_ADMIN')); $subject = '!!! AUCUNE Valeur configurée dans settings email list. !!!'; } $subject .= $this->settings->name . ' : Preuves de gain de ' . $customer->lastname . ' ' . $customer->firstname; return $this->subject($subject)->view( 'front.basic.winning-proof-email', compact('participation', 'customer') )->attach($this->stickerPath)->attach($this->ticketPath) ->attach($this->barcodePath); } }