From f6f73edb5f854311b5ff1303dcd52cceeb7c1633 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 5 Sep 2026 10:29:20 +0530 Subject: [PATCH] Added model masters model files for hasMany relations --- app/Models/Machine.php | 5 +++++ app/Models/Plant.php | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Models/Machine.php b/app/Models/Machine.php index 4caf091..f584c02 100644 --- a/app/Models/Machine.php +++ b/app/Models/Machine.php @@ -48,6 +48,11 @@ class Machine extends Model return $this->hasMany(ClassCharacteristic::class, 'machine_id', 'id'); } + public function ModelMasters() + { + return $this->hasMany(ModelMaster::class, 'machine_id', 'id'); + } + public function windedSerialValidationErrors() { return $this->hasMany(WindedSerialValidationError::class, 'machine_id', 'id'); diff --git a/app/Models/Plant.php b/app/Models/Plant.php index 58a6ed0..bc94564 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -164,10 +164,10 @@ class Plant extends Model return $this->hasMany(ClassCharacteristic::class, 'plant_id', 'id'); } - // public function ModelMasters() - // { - // return $this->hasMany(ModelMaster::class, 'plant_id', 'id'); - // } + public function ModelMasters() + { + return $this->hasMany(ModelMaster::class, 'plant_id', 'id'); + } public function windedSerialValidationErrors() {