38 lines
907 B
PHP
38 lines
907 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class CertificateApprovedForHospitalMail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
protected $certificate;
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct($certificate)
|
|
{
|
|
$this->certificate = $certificate;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
$data = $this?->certificate;
|
|
return $this->subject('Request No: '.requestNumberFormat($data->id).' Name:'.$data?->full_name. ' - Approved')
|
|
->attach($data->pdf_url,['content-type','application/pdf'])
|
|
->view('backend.mail.certificate_approved_for_hospital',compact('data'));
|
|
}
|
|
}
|