Merge pull request #8596 from snipe/fixes/8462_move_accessory_notes

Fixes #8462 - move accessory notes into pivot table
This commit is contained in:
snipe
2020-10-23 14:19:51 -07:00
committed by GitHub
7 changed files with 102 additions and 5 deletions
+2 -1
View File
@@ -295,7 +295,8 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function accessories()
{
return $this->belongsToMany('\App\Models\Accessory', 'accessories_users', 'assigned_to', 'accessory_id')->withPivot('id')->withTrashed();
return $this->belongsToMany('\App\Models\Accessory', 'accessories_users', 'assigned_to', 'accessory_id')
->withPivot('id', 'created_at', 'note')->withTrashed();
}
/**