From e4dc7560b35dd0a2f36d527c1183715e83d0414d Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 24 Aug 2026 10:09:11 +0530 Subject: [PATCH] Added pump testing master model files for hasMany relations --- app/Models/Item.php | 5 +++++ app/Models/Plant.php | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Models/Item.php b/app/Models/Item.php index 5e80092..1b0dc5c 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -49,6 +49,11 @@ class Item extends Model return $this->hasMany(TestingPanelReading::class); } + public function pumpTestingMasters() + { + return $this->hasMany(PumpTestingMaster::class, 'item_id', 'id'); + } + public function processOrders() { return $this->hasMany(ProcessOrder::class); diff --git a/app/Models/Plant.php b/app/Models/Plant.php index dbc57eb..91b3dd6 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -84,10 +84,10 @@ class Plant extends Model return $this->hasMany(TestingPanelReading::class, 'plant_id', 'id'); } - // public function pumpTestingMasters() - // { - // return $this->hasMany(PumpTestingMaster::class, 'plant_id', 'id'); - // } + public function pumpTestingMasters() + { + return $this->hasMany(PumpTestingMaster::class, 'plant_id', 'id'); + } // public function pumpTestingEntries() // {