selahattinunlu / laravel-api-query-builder

Laravel & Lumen Api Query Builder Package
332 stars 66 forks source link

How to select relation field #7

Open paranoid-m opened 8 years ago

paranoid-m commented 8 years ago

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 commented 8 years ago

@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 commented 7 years ago

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