belongsToMany('App\Models\UserInfoModel','user_care_user','user_id','other_user_id'); } // 系统消息 public function systemInfo() { return $this->belongsToMany('App\Models\UserInfoModel','system_info','other_id','user_id')->withPivot('coin'); } public function UserDream() { return $this->belongsToMany('App\Models\DreamInfoModel','user_dream','user_id','dream_id'); } public function supDream() { return $this->belongsToMany('App\Models\DreamInfoModel','system_info','user_id','other_id'); } public function myCareNum() { return $this->hasMany('App\Models\UserCareUser','user_id','id'); } public function myFens() { return $this->hasMany('App\Models\UserCareUser','other_user_id','id'); } public function myCollection() { return $this->hasMany('App\Models\UserCareDream','user_id','id'); } }