<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Ttahunajaran extends Model
{
    protected $connection = 'mai1';

    protected $table = 'ttahunajaran';

    protected $primaryKey = 'id';

    protected $fillable = [
        'nam',
        'idpre',
        'tglmul',
        'tglsel',
        'ket',
        'sta',
        'staakt',
        'rev'
    ];

  public function kelas()
  {
    return $this->hasOne(Tkelas::class, 'idta', 'id');
  }
}
