From da18da316e97d93f215adb80807b5864a6925367 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Fri, 4 Nov 2022 17:40:11 +0700 Subject: [PATCH 1/2] Perbaiki relasi potensi --- app/Models/Potensi.php | 2 +- app/Models/TipePotensi.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Models/Potensi.php b/app/Models/Potensi.php index b316b673d..fa30f1b63 100755 --- a/app/Models/Potensi.php +++ b/app/Models/Potensi.php @@ -49,6 +49,6 @@ class Potensi extends Model public function tipe() { - return $this->hasOne(App\Models\TipePotensi::class, 'id', 'tipe_id'); + return $this->hasOne(TipePotensi::class, 'id', 'kategori_id'); } } diff --git a/app/Models/TipePotensi.php b/app/Models/TipePotensi.php index 3ea077454..011c2f229 100755 --- a/app/Models/TipePotensi.php +++ b/app/Models/TipePotensi.php @@ -41,4 +41,9 @@ class TipePotensi extends Model 'nama_kategori', 'slug', ]; + + public function potensi() + { + return $this->hasMany(Potensi::class, 'kategori_id', 'id'); + } } From 21fdfeaabd66f8f90b4c9625cae22274410dec11 Mon Sep 17 00:00:00 2001 From: Afila Date: Tue, 15 Nov 2022 23:31:28 +0700 Subject: [PATCH 2/2] Update catatan_rilis.md --- catatan_rilis.md | 1 + 1 file changed, 1 insertion(+) diff --git a/catatan_rilis.md b/catatan_rilis.md index 5abf09069..8c46698e0 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -9,3 +9,4 @@ Terima kasih pada [] yang baru mulai berkontribusi. #### Perubahan Teknis 1. [#523](https://github.com/OpenSID/OpenDK/issues/523) Perbaiki relasi tabel pembangunan. +2. [#525](https://github.com/OpenSID/OpenDK/issues/525) Perbaiki relasi tabel potensi.