正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -127,11 +127,11 @@ class Product extends Base | @@ -127,11 +127,11 @@ class Product extends Base | ||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | public function setCategoryIdAttribute($value){ | 129 | public function setCategoryIdAttribute($value){ |
| 130 | - $this->attributes['category_id'] = Arr::arrToSet($value); | 130 | + $this->attributes['category_id'] = ','.Arr::arrToSet($value).','; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | public function getCategoryIdAttribute($value){ | 133 | public function getCategoryIdAttribute($value){ |
| 134 | - return Arr::setToArr($value); | 134 | + return Arr::setToArr(trim($value,',')); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | public function setAttrIdAttribute($value){ | 137 | public function setAttrIdAttribute($value){ |
-
请 注册 或 登录 后发表评论