Update
This commit is contained in:
@@ -244,9 +244,9 @@ class ApotekController extends Controller
|
||||
return $item;
|
||||
});
|
||||
$apotek_phone = DB::connection('mysql')->table('organizations')
|
||||
->leftJoin('addresses', 'addresses.id','=', 'organizations.main_address_id')
|
||||
// ->leftJoin('addresses', 'addresses.id','=', 'organizations.main_address_id')
|
||||
->whereIn('organizations.id', $apotekIds)
|
||||
->pluck('addresses.phone', 'organizations.id');
|
||||
->pluck('organizations.phone', 'organizations.id');
|
||||
$results->getCollection()->transform(function ($item) use ($apotek_phone) {
|
||||
$item->phone_apotek = $apotek_phone->get($item->nIDApotek, '-'); // Default to 'Unknown' if not found
|
||||
return $item;
|
||||
|
||||
Reference in New Issue
Block a user