-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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] Revert PR #38552 #38711
[8.x] Revert PR #38552 #38711
Conversation
Do we need another patch release right after this? |
Probably best. |
Wouldn't it also be possible to check if the route exists and only then generate the link? otherwise pass |
@Jubeki what code do you propose? Can you send in a PR? |
protected function resetUrl($notifiable)
{
if (static::$createUrlCallback) {
return call_user_func(static::$createUrlCallback, $notifiable, $this->token);
}
if(Route::has('password.reset') {
return url(route('password.reset', [
'token' => $this->token,
'email' => $notifiable->getEmailForPasswordReset(),
], false));
}
return null;
} Something like this? |
I can send in a PR |
I personally would prefer static method to generate reset url if needed. |
My idea is also not really good, because it should provide a default URL and not null. No idea what a good default URL is though. |
This PR reverts #38552 because it's a breaking change. Any Laravel app that doesn't has a password reset route will see their app break.
See laravel/nova-issues#3542 & the comments in #38552