belongsTo(User::class,'recommend_user_id','id')->withTrashed(); } public function course(){ return $this->belongsTo(Course::class,'match_type_id','id')->withTrashed(); } public function activity(){ return $this->belongsTo(CommunityActivity::class,'match_type_id','id')->withTrashed(); } public function service(){ return $this->belongsTo(CommunityActivity::class,'match_type_id','id')->withTrashed(); } public function shop(){ return $this->belongsTo(MerchantShop::class,'match_type_id','id')->withTrashed(); } public function consult(){ return $this->belongsTo(Consultation::class,'match_type_id','id')->withTrashed(); } public function evaluate(){ return $this->belongsTo(EvaluateList::class,'match_type_id','test_item_id')->select('id','name as title','test_item_id')->withTrashed(); } }