data = $data; } /** * Get the message envelope. */ // public function envelope(): Envelope // { // return new Envelope( // subject: 'Password Reset Mail', // ); // } /** * Get the message content definition. */ // public function content(): Content // { // return new Content( // view: 'view.name', // ); // } public function build() { // dd($this->data['token']); $mailDescription = mail_template::find(9); $predefinedValues = ['{{$token}}']; $newValues = [$this->data['token']]; $mailData = str_replace($predefinedValues,$newValues,$mailDescription->description); return $this->subject('Mail from Lean In World') ->view('Admin.Templates.adminotp',["content"=>$mailData]); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }