Skip to content

Commit

Permalink
Fixes accessory relationshop for pivot
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Feb 26, 2015
1 parent 430b823 commit c0c563b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c0c563b

Please sign in to comment.