data = $data; } /** * Build the message. * * @return $this */ public function build() { $this->joinFileIfProvided(); return $this->view('emails.contact') ->subject(sprintf('Nouveau message consommateur Le Gaulois (%s)', $this->data->type->label)) ->text('emails.contact-plain') ->with('data', $this->data) ->attachData( view('emails.passerelle-xml', ['data' => $this->data->exportToPasserelleDataArray()])->render(), sprintf('LEGAULOIS_PASS_MESSAGE_%d.xml', date("YmdHis")), ['mime' => 'application/xml'] ); } }