|
|
|
@ -106,10 +106,11 @@ class SlideController extends AdminController |
|
|
|
->dialogWidth('80%;min-width:825px;') |
|
|
|
->from(SelectAgentProduct::make(['id' => $form->url])) |
|
|
|
->options(function ($v) { |
|
|
|
if (!$v) return []; |
|
|
|
if (!$v || $this->type != 0) return []; |
|
|
|
$agent_product = AgentProduct::with('product:id,title') |
|
|
|
->select(['id', 'product_id']) |
|
|
|
->firstWhere(['id' => $v]); |
|
|
|
if (!$agent_product) return []; |
|
|
|
return [$agent_product->id => $agent_product->product->title]; |
|
|
|
}) |
|
|
|
->pluck('product.title') |
|
|
|
|