belongsToMany(Penyakit::class, 'penyakit_gejala') ->withPivot('cf_pakar', 'deskripsi') ->withTimestamps(); } /** * Many-to-Many relationship dengan Rule via rule_detail */ public function rules() { return $this->belongsToMany(Rule::class, 'rule_detail') ->withPivot('urutan') ->orderBy('urutan') ->withTimestamps(); } }