data = $data; $this->template = Template::find(4); } /** * Get the message envelope. * * @return \Illuminate\Mail\Mailables\Envelope */ public function envelope() { return new Envelope( subject: $this->template->subject, ); } /** * Get the message content definition. * * @return \Illuminate\Mail\Mailables\Content */ public function content() { return new Content( view: 'emails.template', with: [ 'template' => str_replace( [ "{\$company_name}", "{\$company_logo}", "{\$password}", ], [ $this->data['company_name'], $this->data['company_logo'], $this->data['password'], ], $this->template->message) ] ); } /** * Get the attachments for the message. * * @return array */ public function attachments() { return []; } }