belongsTo(User::class); } public function team() { return $this->belongsTo(Team::class); } public function otherUser() { return $this->hasOne(User::class,'id','user_id'); } //修改器 public function getBodyAttribute($value) { return json_decode($value); } }