debiprasad liked a comment+100 XP
4mos ago
why laravel add an extra where condition "foreign key is not null" to hasOne/Many relation?
Old post, but as I had the case, I did some digging I finally went to the source directly, and discovered the reason here
hasMany extends HasOneOrMany, and this check is required in the HasOne case.