Postgresql – Select joined table with same column name but different value using eloquent
I'm trying to call 2 columns from 2 different tables. applicants.ic_no and agents.ic_no. It have different values. Using the following codes only displayed only ic_no from agents.ic_no $claimLists = ClaimDetail::join('applicants', 'applicants.ic_no', '=', 'claim_details.ic_no') ->join('agents', 'agents.id', '=', 'claim_details.agent_id') ->where('claim_date', $cutt_off) ->groupBy('agents.id',…