I have no idea what is where.
Nov 5, 2020
4
Level 4
How to Display the Unit_id as name in one table
I need the help to display the unit name which id display in one table,
this is the code i have tried in my controller and am still get the the Id instead of Devicename
$receiveDevice=Issue_to_sale::with('team')
->select('unit_id',DB::raw("group_concat(unit_tag_id SEPARATOR ', ') as all_tags"))
->where([
['team_id',$userId],
['ack_status','=',0]
])
->groupBy('unit_id')
->get();
and my tables
unit_id unit_tag_id
1 2
1 3
1 4
device table id Devicename 1 787878887 3 E07126767 2 655666776
Please or to participate in this conversation.