$this->customer->lastname, 'firstname' => $this->customer->firstname ]), ); } /** * Get the message content definition. * * @return \Illuminate\Mail\Mailables\Content */ public function content(): \Illuminate\Mail\Mailables\Content { $participation = [ trans('Participation :'), trans('Code Unique : :code', ['code' => $this->unique_code]), ]; if ($this->ean_code) { $participation[] = trans('Code EAN : :code', ['code' => $this->ean_code]); } return new Content( htmlString: (new MailMessage()) ->greeting(trans('Bonjour,')) ->line(trans( 'Vous trouverez en PJ les preuves de gain du joueur suivant :', ))->lines([ trans('Lot :'), "{$this->prize_label}", ])->lines([ trans('Gagnant :'), "{$this->customer->lastname} {$this->customer->firstname}", "{$this->customer->address}", "{$this->customer->address2}", "{$this->customer->postcode} {$this->customer->city} - {$this->customer->country->label}", "{$this->customer->email}", "{$this->customer->phone}", ])->lines($participation)->render() ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return [ Attachment::fromPath(FileStorageHelper::getFileFullPath($this->sticker)), Attachment::fromPath(FileStorageHelper::getFileFullPath($this->ticket)), Attachment::fromPath(FileStorageHelper::getFileFullPath($this->barcode)), ]; } }