获取产品名称
This commit is contained in:
parent
532b286b8c
commit
9eac191b3a
|
|
@ -140,13 +140,11 @@ class ProductRepo
|
|||
->whereIn('id', $productIds)
|
||||
->get();
|
||||
|
||||
$items = [];
|
||||
foreach ($products as $product) {
|
||||
$items[] = [
|
||||
return $products->map(function ($product) {
|
||||
return [
|
||||
'id' => $product->id,
|
||||
'name' => $product->description->name ?? ''
|
||||
];
|
||||
}
|
||||
return $items;
|
||||
})->toArray();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue