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

Making customizations to the various queries #17

Open
ethanclevenger91 opened this issue Aug 30, 2016 · 4 comments
Open

Making customizations to the various queries #17

ethanclevenger91 opened this issue Aug 30, 2016 · 4 comments

Comments

@ethanclevenger91
Copy link

Right now, the controllers for this aren't published or replaceable. Is there any way to add some custom logic to the query, say if we wanted to search or sort results?

@acoustep
Copy link
Owner

acoustep commented Sep 2, 2016

Hi @ethanclevenger91

Usually controller level customisation can be done with Events and Listeners, however, I do see your issue.

I might make the controllers publishable but I'm going to think on it first.

@ethanclevenger91
Copy link
Author

The repository library you're using already supports searchable fields via some configureable parameters in config/repository.php under criteria/params. The logic happens here.

The only missing piece is a way to configure certain fields as searchable on the repository, which could be included in your own config. I'm about to put in a PR that demonstrates more-or-less how this would work for the user model, but I'm sure it could be abstracted/extended.

@acoustep
Copy link
Owner

acoustep commented Nov 7, 2016

Thanks @ethanclevenger91, that's a great solution.

@acoustep
Copy link
Owner

acoustep commented Nov 8, 2016

I've just added some documentation for this in the README here. I'll see if I can get the same solution added for roles and permissions soon.

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

2 participants