dimanche 9 juillet 2017

Laravel 5.3 to 5.4 relations foreignKey issue

After updating to 5.4, my relations where not working properly anymore. After inspecting I found out Laravel is now looking for different foreignKey names: user_user_id or post_post_id instead of user_id,post_id etc. This was working until L 5.3. I also had to update some of my pivot tabels primarykey to tag_tag_id etc in order to get them working again.

I updated my tables foreignkey names according to this new convention and now its working. But I still would like to know why and how this changed and where it's coming from.

Thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2sCURB9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire