contact = $contact; } /** * Get the message envelope. */ // public function envelope(): Envelope // { // return new Envelope( // subject: 'Admin Notification Email', // ); // } /** * Get the message content definition. */ // public function content(): Content // { // return new Content( // view: 'Frontend.Templates.contact_us_mailto_admin', // ); // } public function build() { $mailDescription = mail_template::find(7); $predefinedValues = ['{{$name}}','{{$email}}','{{$title}}','{{$message}}']; $newValues = [$this->contact['name'],$this->contact['email'],$this->contact['title'],$this->contact['message']]; $mailData = str_replace($predefinedValues,$newValues,$mailDescription->description); return $this->subject('Mail from Lean In World') ->view('Frontend.Templates.contact_us_mailto_admin',["content"=>$mailData]); // $data = $this->contact; // return $this->subject('Mail from Remider') // ->view('Frontend.Templates.contact_us_mailto_admin') // ->with(['data' => $data]); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }