diff --git a/app/models/User.php b/app/models/User.php index 650c798f7e92..89fc206ccd69 100755 --- a/app/models/User.php +++ b/app/models/User.php @@ -45,7 +45,7 @@ public function assets() public function accessories() { - return $this->belongsToMany('Accessories', 'accessories_users', 'accessory_id', 'assigned_to')->withTrashed(); + return $this->belongsToMany('Accessory', 'accessories_users', 'assigned_to','accessory_id')->withPivot('id')->withTrashed(); } public function licenses()