<?php
namespace App\Mail\Pharmacy;
use App\Modules\Pharmacy\Models\Prescription;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
/**
* Sent to the customer when a pharmacist approves their prescription.
*/
class PrescriptionApprovedMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct(public readonly Prescription $prescription) {}
public function envelope(): Envelope
{
return new Envelope(
subject: 'Your Prescription Has Been Approved — ' . config('app.name'),
);
}
public function content(): Content
{
return new Content(view: 'emails.pharmacy.prescription-approved');
}
}