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

[8.x] Proxy URL Generation in VerifyEmail #34572

Merged
merged 2 commits into from
Sep 30, 2020
Merged

[8.x] Proxy URL Generation in VerifyEmail #34572

merged 2 commits into from
Sep 30, 2020

Conversation

PHPGuus
Copy link
Contributor

@PHPGuus PHPGuus commented Sep 29, 2020

This is in relation to issue #28469 and idea #1635.

Provide a mechanism to create URLs in VerifyEmail similar to the mechanism in ResetPassword. This change increases interface consistency in the Notifications namespace. This change does not break compatability, as it adds a way to overwrite URL generation. If the developer does not provide a callback, the current URL generation is still used.

(Would I need to PR against 7.x if I wanted to propose a backport to the 7.x branch?)

…chanism in `ResetPassword`. This change increases interface consistency in the Notifications namespace. This change does not break compatability, as it adds a way to overwrite URL generation. If the developer does not provide a callback, the current URL generation is still used.
@@ -11,6 +11,13 @@

class VerifyEmail extends Notification
{
/**
* The callback that should be used to create the reset password URL.

This comment was marked as resolved.

);
if (static::$createUrlCallback) {
return call_user_func(static::$createUrlCallback, $notifiable);
} else {

This comment was marked as resolved.

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just kept it the same as it is written in ResetPassword::toMail, hence the else. I agree that it is not necessary...

}

/**
* Set a callback that should be used when creating the reset password button URL.

This comment was marked as resolved.

@driesvints driesvints changed the title Proxy URL Generation in VerifyEmail [8.x] Proxy URL Generation in VerifyEmail Sep 29, 2020
@taylorotwell taylorotwell merged commit 21ac609 into laravel:8.x Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants