Filter queries not override the eloquent query
Hi there!
I have a FIlter in my Table Builder, in which I would like to filter by a computed property setted in resource main page, eloquent query method. I have check that the query works fine at SQL editor.
When I apply the ->query() method from filter, it overrides the eloquent query and the field is not found. How to manage it??
7 Replies
top
Have you found a solution. I need to add selects and order by states to the query. Is is also not working.
Replace yourproperty with your own property
Hi Quin, thank you for your prompt answer. But 'When' and 'Where' statements are not the problem. I need to add selects and group by statements to the query. But thy are not added to the main query.
just use the DB man don't think it needs to be that diffacult, DB::SELECT()->GROUPBY() etc.....
In my case, it is a difficult Statement, but I just found out, that I need to use "modifyBaseQueryUsing".
Solution
This function is doing the trick.