Restore using HasOneThrough for filters #9467
Merged
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.
Changes have been thoroughly tested to not break existing functionality.
All of the tests are passing.
New functionality has been documented or existing documentation has been updated to reflect changes.
I'm not sure that supporting different relationship types is documented anywhere. There is no reference to
\Znck\Eloquent\Relations\BelongsToThrough
in the docs.Visual changes are explained in the PR description using a screenshot/recording of before and after.
No visual changes.
As my primary concern is restoring functionality that appears to have been added twice already in #2486 and #5550, I've focused my testing on getting that working.
However, I did notice one area that might need additional work to fully support HasOneThrough, but I'm not really sure how to work on it. The anonymous function starts on line 811, called by
$this->loadStateFromRelationshipsUsing()
.