laravel5-jsonapi
laravel5-jsonapi copied to clipboard
Query parameter: Filter
Whether this option is implemented? How to Use it, maybe I did not understand? Request type /comments?filter[post]=1
or /comments?post=1
does not give any results.
Filtering is not implemented as the JSONAPI does not enforce any kind of standard on this.
It is read but not used throught the code.
https://github.com/nilportugues/php-json-api/blob/master/src/Http/Request/Request.php#L109
I've got plans on supporting this, as I've got it coded in a private project already. But need to write tests for this.
+1 for this
@nilportugues Feel like sharing the code for what you have in your private project? I don't care about the tests at this point.
@jeremymlane: I've implemented my own solution using RQL if you're interested - take a look here:
https://github.com/srottem/laravel5-jsonapi/tree/feature/filters
I don't know if Nil will want to pull it in and it's not extensively tested yet, but it seems to be working for my use cases.