]> BookStack Code Mirror - bookstack/blob - app/Notifications/UserInvite.php
Adding Lithuanian language
[bookstack] / app / Notifications / UserInvite.php
1 <?php
2
3 namespace BookStack\Notifications;
4
5 class UserInvite extends MailNotification
6 {
7     public $token;
8
9     /**
10      * Create a new notification instance.
11      *
12      * @param string $token
13      */
14     public function __construct($token)
15     {
16         $this->token = $token;
17     }
18
19     /**
20      * Get the mail representation of the notification.
21      *
22      * @param mixed $notifiable
23      *
24      * @return \Illuminate\Notifications\Messages\MailMessage
25      */
26     public function toMail($notifiable)
27     {
28         $appName = ['appName' => setting('app-name')];
29
30         return $this->newMailMessage()
31                 ->subject(trans('auth.user_invite_email_subject', $appName))
32                 ->greeting(trans('auth.user_invite_email_greeting', $appName))
33                 ->line(trans('auth.user_invite_email_text'))
34                 ->action(trans('auth.user_invite_email_action'), url('/register/invite/' . $this->token));
35     }
36 }