<?php

namespace App;

use App\Events\HasilBelajarImported;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class HasilBelajar extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'siswa_id', 'meta',
    ];

    protected $casts = [
        'meta' => 'array',
    ];

    protected $dispatchesEvents = [
        'saved' => HasilBelajarImported::class,
    ];

    public function siswa()
    {
        return $this->belongsTo('App\Siswa');
    }
}
