Closed ClProsser closed 3 years ago
@ClProsser I should check it and make a unit test for this situation as soon. I'll announce you. Thanks for report
@mehdi-fathi Sounds great, thanks for the quick reply and the amazing package
@ClProsser I fixed it. please upgrade eloquent-filter to the 2.5.2 version.
@mehdi-fathi looks like it works now (my tests are passing). Thanks for the quick fix, keep going :)
Describe the bug I try to filter on a model including trashed entries. This works as designed, however, adding
ignoreRequest()
addswhere deleted_at is null
to the query, which is definitely not intended. I don't see any reason why especiallyignoreRequest
should add that.To Reproduce Steps to reproduce the behavior:
::withTrashed()
). The result includes trashed entries (if exist).ignoreRequest()
to the builder. The result does not include trashed entries anymore.Here is some boilerblade code:
The result:
Expected behavior I expect that calling
ignoreRequest()
does not modify the query in that way (i.e. only fields listed as argument should be ignored).Workaround Just remove the desired field (which should be ignored) from the request and add it again afterwards.
Versions:
Additional context I tried this in a fresh laravel project as well, just to confirm my observation.