Laravel two table JOIN
Copy Below Code
View As A Text File
Show Text Only
Show API
Edit Code
$obj =
Table1Model::join('table2', 'table2.id', '=', 'table1.recipient_id')
->whereIn('table1.group_id', $groupArr)
->select(
['table1.type','table2.entity_id', 'table2.full_name', 'table2.email_address', 'table2.designation', 'table1.group_id']
)
->orderBy('table1.type','DESC')
->get();