<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Mapel extends Model
{
    protected $fillable = [
        'kurikulum_id',
        'nama',
        'kategori',
    ];

    public function kurikulum()
    {
        return $this->belongsTo(Kurikulum::class);
    }
    
    public function alternatif()
    {
        return $this->belongsToMany(Alternatif::class, 'alternatif_mapel');
    }
}
