BookStack/app/Access/Notifications/UserInviteNotification.php

28 lines
904 B
PHP
Raw Normal View History

2021-06-26 11:23:15 -04:00
<?php
namespace BookStack\Access\Notifications;
2019-08-17 10:52:33 -04:00
use BookStack\App\MailNotification;
2023-05-17 12:56:55 -04:00
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;
class UserInviteNotification extends MailNotification
2019-08-17 10:52:33 -04:00
{
public function __construct(
public string $token
) {
2019-08-17 10:52:33 -04:00
}
public function toMail(User $notifiable): MailMessage
2019-08-17 10:52:33 -04:00
{
$appName = ['appName' => setting('app-name')];
$language = $notifiable->getLanguage();
2021-06-26 11:23:15 -04:00
return $this->newMailMessage($language)
->subject(trans('auth.user_invite_email_subject', $appName, $language))
->greeting(trans('auth.user_invite_email_greeting', $appName, $language))
->line(trans('auth.user_invite_email_text', [], $language))
->action(trans('auth.user_invite_email_action', [], $language), url('/register/invite/' . $this->token));
2019-08-17 10:52:33 -04:00
}
}