<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Informasi extends Model
{
    use HasFactory;
    protected $primaryKey = 'id';
    protected $fillable = [
        'penyakitId',
        'judul',
        'slug',
        'gambar',
        'penulis',
        'artikel',
    ];

    public function penyakit()
    {
        return $this->belongsTo(Penyakit::class, 'penyakitId', 'penyakitId');
    }
}
