diff --git a/app/Models/Special.php b/app/Models/Special.php new file mode 100644 index 0000000..24060f0 --- /dev/null +++ b/app/Models/Special.php @@ -0,0 +1,39 @@ +host . $v : ''; + } + } + return $value; + } + + //首页广告图 + public function getPictureAdAttribute($value): string + { + return $value ? $this->host . $value : ''; + } + + //代理商产品ID + public function getAgentProductIdAttribute($value) + { + return explode(',', $value); + } + + public function agentProduct() + { + return $this->belongsTo(AgentProduct::class); + } +}