laravel-api-query-builder icon indicating copy to clipboard operation
laravel-api-query-builder copied to clipboard

How to select relation field

Open paranoid-m opened this issue 8 years ago • 2 comments

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

paranoid-m avatar Jun 16 '16 08:06 paranoid-m

@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 avatar Jun 21 '16 05:06 selahattinunlu

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

robsontenorio avatar May 30 '17 01:05 robsontenorio