mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
9dc9724e15
* Started move to laravel 5.3 * Started updating login & registration flows for laravel 5.3 update * Updated app emails to notification system * Fixed registations bugs and removed email confirmation model * Fixed large portion of laravel post-upgrade issues * Fixed and tested LDAP process
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace BookStack\Notifications;
|
|
|
|
use Illuminate\Notifications\Notification;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class ConfirmEmail extends Notification
|
|
{
|
|
|
|
public $token;
|
|
|
|
/**
|
|
* Create a new notification instance.
|
|
* @param string $token
|
|
*/
|
|
public function __construct($token)
|
|
{
|
|
$this->token = $token;
|
|
}
|
|
|
|
/**
|
|
* Get the notification's delivery channels.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return array
|
|
*/
|
|
public function via($notifiable)
|
|
{
|
|
return ['mail'];
|
|
}
|
|
|
|
/**
|
|
* Get the mail representation of the notification.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
*/
|
|
public function toMail($notifiable)
|
|
{
|
|
return (new MailMessage)
|
|
->subject('Confirm your email on ' . session('app-name'))
|
|
->greeting('Thanks for joining ' . setting('app-name') . '!')
|
|
->line('Please confirm your email address by clicking the button below:')
|
|
->action('Confirm Email', baseUrl('/register/confirm/' . $this->token));
|
|
}
|
|
|
|
}
|