"专线", 1 => "直发车", 2 => "德邦", ]; static function nameById($id){ $logistic=Logistic::where('id',$id)->first(); return $logistic?$logistic['name']:''; } public function ownerPriceExpresses() { return $this->belongsToMany(OwnerPriceExpress::class,"owner_price_express_logistic","logistic_id","owner_price_express_id"); } public function getTagAttribute($value):string { if ($value==="" || $value===null)return ""; $tag = explode(",",$value); foreach ($tag as &$t)$t = self::TAGS[$t]; return implode(",",$tag); } }