skip to Main Content

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',…

VIEW QUESTION

How to get records in Laravel 9.x belongsToMany relationship orderBy relationship existence, followed by abstinence using pagination – PHP Versions

Laravel version 9.x PHP version 8.1 Current code. /** * Show the form for editing the specified resource. * * @param AppModelsSite $site * * @return IlluminateHttpResponse */ public function edit(Request $request, Site $site) { $site->load(['servers' => function($query) { $query->select('id')->orderBy('id',…

VIEW QUESTION
Back To Top
Search