user_data = $user_data; } /** * Get the message envelope. */ // public function envelope(): Envelope // { // return new Envelope( // subject: 'Send Cancellation Email', // ); // } /** * Get the message content definition. */ // public function content(): Content // { // return new Content( // view: 'view.name', // ); // } public function build() { $mailDescription = mail_template::find(10); $predefinedValues = ['{{$first_name}}','{{$last_name}}']; $newValues = [$this->user_data['first_name'],$this->user_data['last_name']]; $mailData = str_replace($predefinedValues,$newValues,$mailDescription->description); return $this->subject('Lean In Program Fee Deadline!') ->view('Frontend.Templates.send_regi_failed',["content"=>$mailData]); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }