|
...
|
...
|
@@ -32,10 +32,10 @@ class Product extends Base |
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setThumbAttribute($value){
|
|
|
|
$value['url'] = Upload::url2path($value['url']);
|
|
|
|
$this->attributes['thumb'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
// public function setThumbAttribute($value){
|
|
|
|
// $value['url'] = Upload::url2path($value['url']);
|
|
|
|
// $this->attributes['thumb'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
|
|
|
|
public function getThumbAttribute($value){
|
|
|
|
$value = Arr::s2a($value);
|
|
...
|
...
|
@@ -43,12 +43,12 @@ class Product extends Base |
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setGalleryAttribute($value){
|
|
|
|
foreach ($value as &$v){
|
|
|
|
$v['url'] = Upload::url2path($v['url']);
|
|
|
|
}
|
|
|
|
$this->attributes['gallery'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
// public function setGalleryAttribute($value){
|
|
|
|
// foreach ($value as &$v){
|
|
|
|
// $v['url'] = Upload::url2path($v['url']);
|
|
|
|
// }
|
|
|
|
// $this->attributes['gallery'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
|
|
|
|
public function getGalleryAttribute($value){
|
|
|
|
$value = Arr::s2a($value);
|
...
|
...
|
|