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() // {