Is it possible to join two tables of different db connections (mysql and oracle in two different servers) based on condition?
I want to preform this query:
DB::connection('oracle')->table('SYSADM.PS_KS_COM_PERS_INF AS PRES')
->join(DB::connection('mysql')->table('students AS STU'),
'PRES.NATIONAL_ID','=','STU.NationalID')
->where('PRES.STUDENT_STATUS', '=', 'Record Closed')
->where('STU.Batch', '=', $value->Batch)
->get(); // or count();
I created model of each table and connection,
but I couldn't join two models of two db connections