Closed X-Coder264 closed 2 years ago
@X-Coder264 thanks for taking the time to do this, but having investigated this, the bug is actually in the WhereHas
filter - when it creates the FilterApplicator
it is passing the wrong schema to it.
I'll close this PR, push my fix and comment on the issue about how you can give the fix a go.
@lindyhopchris You can reuse my test, if it passes it means that the issue has been fixed. I'll retest your solution manually though just to be sure.
@X-Coder264 I used a slightly different test setup so that I could test that filters from the relationship worked too. I.e. pivot filters.
Closes https://github.com/laravel-json-api/laravel/issues/139