<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class AssignmentCreated extends Mailable
{
use Queueable, SerializesModels;
public function __construct(public $trainer, public $trainee) {}
public function envelope(): Envelope
{
return new Envelope(
subject: 'New assignment from ' . $this->trainer->name,
from: new Address($this->trainer->email, $this->trainer->name),
);
}
public function content(): Content
{
return new Content(
view: 'emails.assignment-created'
);
}
public function attachments(): array
{
return [];
}
}
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎