From 15c96f753c2b99c924c3095315518cac7184cf10 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 8 Dec 2025 20:22:55 +0000 Subject: [PATCH] =?UTF-8?q?Revert=20hasMany=20=E2=80=9Cfix=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/PredefinedKit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/PredefinedKit.php b/app/Models/PredefinedKit.php index 42dfdd9377..2d0c87066e 100644 --- a/app/Models/PredefinedKit.php +++ b/app/Models/PredefinedKit.php @@ -189,7 +189,7 @@ class PredefinedKit extends SnipeModel */ public function accessories() { - return $this->hasMany(\App\Models\Accessory::class, 'accessory_id', 'kit_id')->withPivot('id', 'quantity'); + return $this->belongsToMany(\App\Models\Accessory::class, 'kits_accessories', 'kit_id', 'accessory_id')->withPivot('id', 'quantity'); } /**