You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
554 B

<?php
namespace App\Model\v3;
use App\Model\Model;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\SoftDeletes;
class GoodsActivityBanner extends Model
{
use SoftDeletes;
protected $table = 'lanzu_goods_activity_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;
}
}
}