hasMany(StudioOrderDetail::class,'order_id'); } public function belong_user(){ return $this->belongsTo(User::class,'good_user_id'); } public function get_good(){ return $this->belongsTo(StudioGood::class,'goods_id','id'); } public function address(){ return $this->belongsTo(Address::class,'address_id'); } /**获取物流信息**/ public function get_express(){ return $this->hasMany(StudioExpress::class,'order_id'); } }