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

How to select relation field #7

Open
paranoid-m opened this issue Jun 16, 2016 · 2 comments
Open

How to select relation field #7

paranoid-m opened this issue Jun 16, 2016 · 2 comments

Comments

@paranoid-m
Copy link

paranoid-m commented Jun 16, 2016

Hi ,
I have News and NewsCategory module.
How to search in NewsCategory name field
When I use this
news_categories.name=test&columns=*&title=test*&includes=NewsCategory
show me error

Unknown column 'news_categories.name'

But when I use this
columns=*&title=test*&includes=NewsCategory
Show me all news with NewsCategory have test in title

@selahattinunlu
Copy link
Owner

selahattinunlu commented Jun 21, 2016

@yepco It's not support relational field search yet. But you can use custom filter to do this.

Please check: https://github.com/selahattinunlu/laravel-api-query-builder/wiki/Creating-Custom-Filter#2-when-you-need-the-advanced-query

@robsontenorio
Copy link

robsontenorio commented May 30, 2017

@selahattinunlu Is that possible create custom order_by (considering a relationship)?

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

3 participants