2023-08-20 22:35:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Mail\Mailables\Content;
|
|
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
class UserInvite extends Mailable
|
|
|
|
{
|
|
|
|
use Queueable;
|
|
|
|
use SerializesModels;
|
|
|
|
|
2024-04-18 14:36:28 +00:00
|
|
|
public function __construct(private readonly User $invitee)
|
2023-08-20 22:35:58 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function content(): Content
|
|
|
|
{
|
|
|
|
return new Content(
|
|
|
|
markdown: 'emails.users.invite',
|
|
|
|
with: [
|
|
|
|
'invitee' => $this->invitee,
|
|
|
|
'url' => url("/#/invitation/accept/{$this->invitee->invitation_token}"),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function envelope(): Envelope
|
|
|
|
{
|
|
|
|
return new Envelope(subject: 'Invitation to join Koel');
|
|
|
|
}
|
|
|
|
}
|