3 namespace BookStack\Notifications;
5 use BookStack\Users\Models\User;
6 use Illuminate\Notifications\Messages\MailMessage;
8 class UserInvite extends MailNotification
13 * Create a new notification instance.
15 public function __construct(string $token)
17 $this->token = $token;
21 * Get the mail representation of the notification.
23 public function toMail(User $notifiable): MailMessage
25 $appName = ['appName' => setting('app-name')];
26 $language = setting()->getUser($notifiable, 'language');
28 return $this->newMailMessage()
29 ->subject(trans('auth.user_invite_email_subject', $appName, $language))
30 ->greeting(trans('auth.user_invite_email_greeting', $appName, $language))
31 ->line(trans('auth.user_invite_email_text', [], $language))
32 ->action(trans('auth.user_invite_email_action', [], $language), url('/register/invite/' . $this->token));