Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query parameter: Filter #78

Open
IMucaMI opened this issue Jul 8, 2016 · 4 comments
Open

Query parameter: Filter #78

IMucaMI opened this issue Jul 8, 2016 · 4 comments

Comments

@IMucaMI
Copy link

IMucaMI commented Jul 8, 2016

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.

@nilportugues
Copy link
Owner

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.

@jeremymlane
Copy link
Contributor

+1 for this

@jeremymlane
Copy link
Contributor

@nilportugues Feel like sharing the code for what you have in your private project? I don't care about the tests at this point.

@srottem
Copy link

srottem commented Sep 24, 2016

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants