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'); + } } 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.