2021-06-26 17:23:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace BookStack\Notifications;
|
2019-08-17 16:52:33 +02:00
|
|
|
|
|
|
|
class UserInvite extends MailNotification
|
|
|
|
{
|
|
|
|
public $token;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new notification instance.
|
2021-06-26 17:23:15 +02:00
|
|
|
*
|
2019-08-17 16:52:33 +02:00
|
|
|
* @param string $token
|
|
|
|
*/
|
|
|
|
public function __construct($token)
|
|
|
|
{
|
|
|
|
$this->token = $token;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the mail representation of the notification.
|
|
|
|
*
|
2021-06-26 17:23:15 +02:00
|
|
|
* @param mixed $notifiable
|
|
|
|
*
|
2019-08-17 16:52:33 +02:00
|
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
|
|
*/
|
|
|
|
public function toMail($notifiable)
|
|
|
|
{
|
|
|
|
$appName = ['appName' => setting('app-name')];
|
2021-06-26 17:23:15 +02:00
|
|
|
|
2019-08-17 16:52:33 +02:00
|
|
|
return $this->newMailMessage()
|
|
|
|
->subject(trans('auth.user_invite_email_subject', $appName))
|
|
|
|
->greeting(trans('auth.user_invite_email_greeting', $appName))
|
|
|
|
->line(trans('auth.user_invite_email_text'))
|
|
|
|
->action(trans('auth.user_invite_email_action'), url('/register/invite/' . $this->token));
|
|
|
|
}
|
|
|
|
}
|