Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Pass email verification URL to callback #28428

Merged
merged 1 commit into from
May 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/Illuminate/Auth/Notifications/VerifyEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
}

Expand Down