belongsTo(ReportList::class, 'report_id'); } public function segmen() { return $this->belongsTo(MapSegment::class, 'segment_id'); } public function report_photo() { return $this->hasMany(ReportPhoto::class, 'report_segment_id'); } public function report_photo_repair() { return $this->hasMany(ReportPhotoRepair::class, 'report_segment_id'); } public function irrigation() { return $this->hasOneThrough(MapList::class, MapSegment::class, 'id', 'id', 'segment_id', 'irrigation_id'); } }