around this issue What you have here is mostly fine for a simple implementation, but be careful with your Foreign Key names. "msg" in Msg should be called MsgContentId or something similar if it is the ID pointing to the second table. For a n:m relationship you will just need foreign keys pointing both ways. Hope this helps!
In doctrine what implications do 'relations:' have if the 2 relations are defined for two seperate column with a same ta
By : Jorge Chávez
Date : March 29 2020, 07:55 AM
I wish this helpful for you Yes, you need to name them differently. I asked & received for the same problem here:
laravel get all models with relations and the relations of these relations