|
|
|
@ -17,7 +17,9 @@ class SpecialController extends Controller |
|
|
|
$detail = Special::query() |
|
|
|
->select(['id', 'picture', 'updated_at', 'agent_product_id']) |
|
|
|
->find($id); |
|
|
|
$detail->picture = array_map(fn($v) => $prefix . $v, $detail->picture); |
|
|
|
if ($detail->picture) { |
|
|
|
$detail->picture = array_map(fn($v) => $prefix . $v, $detail->picture); |
|
|
|
} |
|
|
|
|
|
|
|
$detail->product = AgentProduct::list($this->agent_id) |
|
|
|
->whereIn('id', $detail->agent_product_id) |
|
|
|
|