I'm trying to upgrade to Laravel 6 from 5.8. We're using a custom verification email Notification
with the following code to get the verification URL:
URL::temporarySignedRoute(
'verification.verify',
Carbon::now()->addMinutes(60),
[
'id' => $notifiable->getKey(),
]
);
This seems to generate an URL that does not work with the new route (check this), for example:
http://host/email/verify/38?expires=1574602925&signature=4410c2230623619633be56d3641814cea3c77236bf8435cba88fc102a35d3dc4
I couldn't find anything on that specific topic online so far, so I'd appreciate any help to get this to work in Laravel 6.
Thanks in advance.
Okay, I found the solution in:
vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
Had to change the code to:
return URL::temporarySignedRoute(
'verification.verify',
Carbon::now()->addMinutes(60),
[
'id' => $notifiable->getKey(),
'hash' => sha1($notifiable->getEmailForVerification()),
]
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With