From cd09b912ee91c0bb6d31b335e36f389b2eff3420 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 2 Jul 2025 18:03:26 +0530 Subject: [PATCH] Added hasMany relations for guard patrol entry --- app/Models/Plant.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/Models/Plant.php b/app/Models/Plant.php index 389c2e1..926072e 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -62,4 +62,24 @@ class Plant extends Model { return $this->hasMany(TestingPanelReading::class); } + + public function guardNames() + { + return $this->hasMany(GuardName::class, 'plant_id', 'id'); + } + + public function checkPointNames() + { + return $this->hasMany(CheckPointName::class, 'plant_id', 'id'); + } + + public function checkPointTimes() + { + return $this->hasMany(CheckPointTime::class, 'plant_id', 'id'); + } + + public function guardPatrolEntries() + { + return $this->hasMany(GuardPatrolEntry::class, 'plant_id', 'id'); + } }