#my code
select('a.client_location_id as location_id','b.name as location_name','c.name as client_name',
DB::raw('SUM(CASE WHEN a.type = 1 employee_qty THEN 1 ELSE 0 END) as e_qty_in'),
DB::raw('SUM(CASE WHEN a.type = 2 employee_qty THEN 1 ELSE 0 END) as e_qty_out')
)
i want to do IF conditioning like , if type = 1 result is SUM employee_qty AS e_qty_in and if type 2 the result is SUM employee_qty AS e_qty_out,
#table
