46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace App\Mail;
|
||
|
|
||
|
use Illuminate\Bus\Queueable;
|
||
|
use Illuminate\Mail\Mailable;
|
||
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
||
|
class CustomMailer extends Mailable
|
||
|
{
|
||
|
use Queueable, SerializesModels;
|
||
|
|
||
|
public $formData;
|
||
|
|
||
|
public function __construct($formData)
|
||
|
{
|
||
|
$this->formData = $formData;
|
||
|
}
|
||
|
public function build()
|
||
|
{
|
||
|
|
||
|
$t = $this->subject('Congratulations !!!')->markdown(env("CLIENT_PATH").'.emails.registration-completed', ['formData' => $this->formData]);
|
||
|
if (isset($formData['qr_code_path'])) {
|
||
|
$t = $t->attach($this->formData['qr_code_path']);
|
||
|
}
|
||
|
return $t;
|
||
|
}
|
||
|
|
||
|
public function registration_completed()
|
||
|
{
|
||
|
// dd($this->formData);
|
||
|
|
||
|
return $this->subject('Recived a new online enquiry from our website.')->markdown(env("CLIENT_PATH").'.emails.registration-completed', $this->formData);
|
||
|
}
|
||
|
|
||
|
|
||
|
public function enquiryform()
|
||
|
{
|
||
|
return $this->subject('Recived a new online enquiry from our website.')->markdown(env("CLIENT_PATH").'.emails.enquiry-submitted', $this->formData);
|
||
|
}
|
||
|
public function enquiryresponse()
|
||
|
{
|
||
|
return $this->subject('Thankyou from ' . env('APP_NAME'))->markdown(env("CLIENT_PATH").'.emails.enquiry-response', $this->formData);
|
||
|
}
|
||
|
}
|