|
|
|
@ -44,6 +44,7 @@ class GoodsActivity extends Model |
|
|
|
'is_effective', |
|
|
|
'noneffective_note', |
|
|
|
'total_seconds', |
|
|
|
'details_imgs_url', |
|
|
|
]; |
|
|
|
|
|
|
|
// protected $visible = [
|
|
|
|
@ -101,4 +102,13 @@ class GoodsActivity extends Model |
|
|
|
return $this->morphMany(ShoppingCart::class, 'goods'); |
|
|
|
} |
|
|
|
|
|
|
|
public function getDetailsImgsUrlAttribute() |
|
|
|
{ |
|
|
|
$details_imgs = $this->details_imgs; |
|
|
|
$img_host = config('alioss.img_host').'/'; |
|
|
|
|
|
|
|
return collect($details_imgs)->map(function($item) use ($img_host){ |
|
|
|
return $img_host . $item; |
|
|
|
}); |
|
|
|
} |
|
|
|
} |