Join GitHub today
Why is hasOne and hasMany array key/value order opposite? #14313
What steps will reproduce the problem?
What is the expected result?
k/v order to be similar
What do you get instead?
k/v order is opposite when comparing hasOne Vs hasMamany
This is intended. From the Guide:
This actually makes it easier to remember.
This isn't an Issue and maybe you should use the forums to ask this kind of things. But answering your question, the value of the array is the property of the model where you are declaring these methods and the key of the array is the property of the related model.