How to use search on sub queries #629
Unanswered
Unisolgr14
asked this question in
Q&A
Replies: 3 comments
-
I got the same problem |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe this helps, cause you can add a QueryBuilder as subquery in an EloquentBuilder:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Try this (works for me):
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have many powergrid tables. And, I have to use lots of sub queries using joins as well as not using it. one of them is given below. How to use search/filter through
full_name
The query extracted from the
datasource()
functionreturn ShareInfo::query() ->join('share_details','share_details.id','=','share_infos.share_type') ->join('parameters','parameters.para_id','=','share_details.share_type') ->join('members','members.member_id','=','share_infos.member_id') ->where('parameters.para_type','=','share') ->select( DB::raw("CONCAT(first_name,if(trim(middle_name)='','',concat(' ',middle_name)),if(trim(last_name)='','',concat(' ',last_name)))as full_name"), 'share_infos.share_id', 'share_infos.amount', 'share_infos.quantity', 'share_infos.spd', 'share_infos.share_type', 'share_infos.status', 'parameters.para_name as share_type_name') ;
Beta Was this translation helpful? Give feedback.
All reactions