[9.x] Let MustVerifyEmail to be used on models without id as primary key#44613
[9.x] Let MustVerifyEmail to be used on models without id as primary key#44613taylorotwell merged 1 commit intolaravel:9.xfrom arturzealves:feature/verify-email-without-id-as-key
Conversation
|
This is a breaking change @taylorotwell! @arturzealves This is a route function, and it's not related to ORM. My registration page is now crashed because of this change, and I've to override the fortify route file and change the |
|
Sorry for causing you issues @mtawil and @taylorotwell. Well to me it doesn't make sense to have that route with an hard coded index I was not expecting to have my first pull request approved right away and I was thinking that there was still something to change regarding the route part, to also make it dynamic and avoid having to override it, as I described in this PR description. Do you have any suggestion for my issue then? I don't have an |
Description
I decided to change the primary key of my
Usermodel, fromidtouuidand after that change, one of the feature tests started to fail.I don't have the initial error anymore but I had to override this route on my
routes/web.php:only because I needed to change the route from
/email/verify/{id}/{hash}to/email/verify/{uuid}/{hash}.After that change, I was still having this error:

So after some debug I found the source of the issues and the change I made on this pull request should allow other people on a similar situation, to change the name of the primary key to another name other than
idwithout being backwards incompatible.I'm not sure if this pull request should also have a fix for the route I mentioned above, but I'm ok with having an override on the
routes/web.php.