forked from TFMM/silent-auction
59 lines
1.2 KiB
PHP
59 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Attachment;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class PickupSlipMail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
protected $pdfOutput;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*/
|
|
public function __construct($pdfOutput)
|
|
{
|
|
$this->pdfOutput = $pdfOutput;
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*/
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: 'Item Pickup Slip',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.pickup_slip',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the attachments for the message.
|
|
*
|
|
* @return array<int, Attachment>
|
|
*/
|
|
public function attachments(): array
|
|
{
|
|
return [
|
|
Attachment::fromData(fn () => $this->pdfOutput, 'pickup_slip.pdf')
|
|
->withMime('application/pdf'),
|
|
];
|
|
}
|
|
}
|