mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 22:01:33 +00:00
66 lines
1.5 KiB
PHP
66 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Invitation;
|
|
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 InvitationMail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public Invitation $invitation;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*/
|
|
public function __construct(Invitation $invitation)
|
|
{
|
|
$this->invitation = $invitation;
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*/
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: 'You\'re invited to join '.config('app.name'),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.invitation',
|
|
with: [
|
|
'invitation' => $this->invitation,
|
|
'invitedBy' => $this->invitation->invitedBy,
|
|
'registerUrl' => route('register', ['token' => $this->invitation->token]),
|
|
'expiresAt' => $this->invitation->expires_at,
|
|
'siteName' => config('app.name'),
|
|
],
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the attachments for the message.
|
|
*
|
|
* @return array<int, Attachment>
|
|
*/
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|