| 
									
										
										
										
											2021-06-26 23:23:15 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace BookStack\Notifications; | 
					
						
							| 
									
										
										
										
											2016-09-18 01:22:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-17 04:44:57 +08:00
										 |  |  | class ConfirmEmail extends MailNotification | 
					
						
							| 
									
										
										
										
											2016-09-18 01:22:04 +08:00
										 |  |  | { | 
					
						
							|  |  |  |     public $token; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Create a new notification instance. | 
					
						
							| 
									
										
										
										
											2021-06-26 23:23:15 +08:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2016-09-18 01:22:04 +08:00
										 |  |  |      * @param string $token | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function __construct($token) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->token = $token; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get the mail representation of the notification. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2021-06-26 23:23:15 +08:00
										 |  |  |      * @param mixed $notifiable | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2016-09-18 01:22:04 +08:00
										 |  |  |      * @return \Illuminate\Notifications\Messages\MailMessage | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function toMail($notifiable) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2016-09-18 04:33:55 +08:00
										 |  |  |         $appName = ['appName' => setting('app-name')]; | 
					
						
							| 
									
										
										
										
											2021-06-26 23:23:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-17 04:44:57 +08:00
										 |  |  |         return $this->newMailMessage() | 
					
						
							|  |  |  |                 ->subject(trans('auth.email_confirm_subject', $appName)) | 
					
						
							|  |  |  |                 ->greeting(trans('auth.email_confirm_greeting', $appName)) | 
					
						
							|  |  |  |                 ->line(trans('auth.email_confirm_text')) | 
					
						
							| 
									
										
										
										
											2019-08-04 21:26:39 +08:00
										 |  |  |                 ->action(trans('auth.email_confirm_action'), url('/register/confirm/' . $this->token)); | 
					
						
							| 
									
										
										
										
											2016-09-18 01:22:04 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | } |