Browse Source

增加setProductIdsAttribute修改器

dev
李可松 4 years ago
parent
commit
958c99ba4a
  1. 7
      app/Models/AgentProduct.php

7
app/Models/AgentProduct.php

@ -43,4 +43,11 @@ class AgentProduct extends BaseModel
$this->attributes['channel_id'] = join(',', array_filter($value));
}
}
public function setProductIdsAttribute($value)
{
if (is_array($value)) {
$this->attributes['product_ids'] = join(',', array_filter($value));
}
}
}
Loading…
Cancel
Save