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