diff --git a/src/Illuminate/Auth/Notifications/VerifyEmail.php b/src/Illuminate/Auth/Notifications/VerifyEmail.php index d92a71daae97..494111e806e7 100644 --- a/src/Illuminate/Auth/Notifications/VerifyEmail.php +++ b/src/Illuminate/Auth/Notifications/VerifyEmail.php @@ -37,17 +37,16 @@ public function via($notifiable) */ public function toMail($notifiable) { + $verificationUrl = $this->verificationUrl($notifiable); + if (static::$toMailCallback) { - return call_user_func(static::$toMailCallback, $notifiable); + return call_user_func(static::$toMailCallback, $notifiable, $verificationUrl); } return (new MailMessage) ->subject(Lang::getFromJson('Verify Email Address')) ->line(Lang::getFromJson('Please click the button below to verify your email address.')) - ->action( - Lang::getFromJson('Verify Email Address'), - $this->verificationUrl($notifiable) - ) + ->action(Lang::getFromJson('Verify Email Address'), $verificationUrl) ->line(Lang::getFromJson('If you did not create an account, no further action is required.')); }