Add Nested Array Support to $models->loadMissing()
#53297
Unanswered
angus-mcritchie
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It's inconsistant to have
with()
andload()
to work with nested arrays to load relations butloadMissing()
does not.Instead, it loads the first level and ignores the nested relations without warning until later when you try and access it and get a
Illuminate\Database\LazyLoadingViolationException
.I'm happy to write a PR, but want to check with the Laravel team and comunity if there isn't a good reason for this and if a PR would be considered.
Current Behaviour
This discussion is to load
author
andmedia
when callingloadMissing()
on a model.Similar to #38721 but not identical.
Beta Was this translation helpful? Give feedback.
All reactions