From c8cc9e3ba08def065d19dd6b3f3c51ceb0f7df09 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 2 Apr 2026 12:17:58 +0530 Subject: [PATCH] Updated foreign key for motorTestingMasters hasMany relation on model file --- app/Models/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Item.php b/app/Models/Item.php index c4ebc33..96863fa 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -41,7 +41,7 @@ class Item extends Model public function motorTestingMasters() { - return $this->hasMany(MotorTestingMaster::class); + return $this->hasMany(MotorTestingMaster::class, 'item_id', 'id'); } public function testingPanelReadings()