Better user creation email.

This commit is contained in:
Dane Everitt 2017-02-17 18:48:57 -05:00
parent 3240601d03
commit 95171a3e41
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 14 additions and 20 deletions

View file

@ -45,9 +45,9 @@ class AccountCreated extends Notification implements ShouldQueue
*
* @return void
*/
public function __construct($token)
public function __construct(array $user)
{
$this->token = $token;
$this->user = $user;
}
/**
@ -70,8 +70,10 @@ class AccountCreated extends Notification implements ShouldQueue
public function toMail($notifiable)
{
return (new MailMessage)
->line('You are recieving this email because an account has been created for you on Pterodactyl Panel.')
->line('Email: ' . $notifiable->email)
->action('Setup Your Account', url('/auth/password/reset/' . $this->token . '?email=' . $notifiable->email));
->greeting('Hello ' . $this->user->name . '!')
->line('You are recieving this email because an account has been created for you on Pterodactyl Panel.')
->line('Username: ' . $this->user->username)
->line('Email: ' . $notifiable->email)
->action('Setup Your Account', url('/auth/password/reset/' . $this->user->token . '?email=' . $notifiable->email));
}
}

View file

@ -75,17 +75,4 @@ class SendPasswordReset extends Notification implements ShouldQueue
->action('Reset Password', url('auth/password/reset', $this->token))
->line('If you did not request a password reset, no further action is required.');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}