laravel-api-query-builder
laravel-api-query-builder copied to clipboard
How to select relation field
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
@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
@selahattinunlu Is that possible create custom order_by (considering a relationship)?