|
|
|
@ -10,4 +10,19 @@ class GoodsBanner extends Model |
|
|
|
{ |
|
|
|
use SoftDeletes; |
|
|
|
protected $table = 'lanzu_goods_banners'; |
|
|
|
|
|
|
|
protected $appends = [ |
|
|
|
'banner_url', |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
public function getBannerUrlAttribute() |
|
|
|
{ |
|
|
|
$url = $this->attributes['path']; |
|
|
|
if(strripos($url,"http") === false){ |
|
|
|
return config('alioss.img_host').'/'.$url; |
|
|
|
}else{ |
|
|
|
return $url; |
|
|
|
} |
|
|
|
} |
|
|
|
} |