mirror of
https://github.com/koel/koel
synced 2024-12-21 10:03:10 +00:00
37 lines
803 B
PHP
37 lines
803 B
PHP
|
<?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;
|
||
|
|
||
|
public function __construct(private User $invitee)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
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');
|
||
|
}
|
||
|
}
|