Files
izyim/app/Notifications/VerifyEmail.php
T
2019-03-19 17:11:21 +08:00

38 lines
922 B
PHP
Executable File

<?php
namespace App\Notifications;
use App\Models\UserEmailVerification;
use Illuminate\Notifications\Messages\MailMessage;
class VerifyEmail extends AbstractEmail
{
/** @var UserEmailVerification */
private $attempt;
/**
* EmailVerificationRequest constructor.
*
* @param UserEmailVerification $attempt
*/
public function __construct(UserEmailVerification $attempt) {
$this->attempt = $attempt;
}
public function toMail()
{
return (new MailMessage)
->subject('Email Verification Required')
->line('Please click the button below to verify your email address.')
->action('Verify Email Address', $this->verificationUrl()
)
->line('If you did not create an account, no further action is required.');
}
private function verificationUrl(){
return $this->attempt->token;
}
}