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

RestrictiveQueryChecker (filter, sort, etc) #9

Closed
ghost opened this issue Apr 17, 2016 · 3 comments
Closed

RestrictiveQueryChecker (filter, sort, etc) #9

ghost opened this issue Apr 17, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2016

Hey again,

Just trying to figure out where to pass the rules for the RestrictiveQueryChecker in the underlying neomerx package?

I'm getting an error on ->checkFiltering etc, but I don't know where in the controller to allow filtering params?

Would be a good update to the docs if it's an easy answer :) 👍

@lindyhopchris
Copy link
Member

Override the properties on the controller, e.g.

protected $allowedFilteringParameters = ['foo', 'bar'];

Good point, this needs to be clearer in the docs. I'll leave this issue open so that I remember to do that.

@ghost
Copy link
Author

ghost commented Apr 25, 2016

Also on this topic, I can now see

$sort = $this->getParameters()->getSortParameters()

but when I try to access them like $sort[0]->sortField it throws an error of

Cannot access private property Neomerx\JsonApi\Parameters\SortParameter::$sortField.

Is there a different way we're supposed to access the sort parameters?

This issue was closed.
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

1 participant