contact = $contact; } /** * Get the message envelope. */ // public function envelope(): Envelope // { // return new Envelope( // subject: 'Inquiry/Request for Contact Leaninworld.org', // ); // } /** * Get the message content definition. */ // public function content(): Content // { // return new Content( // view: 'Frontend.Templates.contact_us', // ); // } /** * Build the message. * * @return $this */ public function build() { // $data = $this->contact; // dd($data); // #attributes: array:7 [ // "name" => "Megha Ganesh Malore" // "email" => "megha@wdimails.com" // "title" => "Enquirry" // "message" => "EnquirryEnquirryEnquirryEnquirryEnquirry" // "updated_at" => "2023-11-07 06:57:51" // "created_at" => "2023-11-07 06:57:51" // "id" => 61 // ] $mailDescription = mail_template::find(6); $predefinedValues = ['{{$name}}']; $newValues = [$this->contact['name']]; $mailData = str_replace($predefinedValues,$newValues,$mailDescription->description); return $this->subject('Mail from Lean In World') ->view('Frontend.Templates.contact_us',["content"=>$mailData]); // $data = $this->contact; // return $this->subject('Mail from Lean In World') // ->view('Frontend.Templates.contact_us') // ->with(['data' => $data]); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }