Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Runway v5, we had an
eagerLoadingRelations
method which was primarily used to determine which relationships should be eager-loaded when querying models.It'd try to automatically figure out which blueprint fields map to which Eloquent relationships. If you didn't like its magic, you could override it by specifying a
with
option in your resource config.As part of my refactoring for Runway v6, I renamed the method to simply
eloquentRelationships
since that method was being used for "field -> relationship" mappings for things other than eager loading.I also renamed the config option from
with
torelationships
.However, looking back at these changes now, it seems like I should have kept the
with
config option and had a separate option just for the eager-loading of relationships so none of Runway's relationship mappings get messed up when you take control of eager-loading.Soo.... that's what I've done in this PR. Split out eager loading stuff into its own method & changed the config setting back to
with
.References #412.