IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/app/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/app/Timetable.php

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Timetable extends Model {

    protected $primaryKey = 'idTimetable';
    protected $table = 'timetable';
    protected $fillable = ['idSchool', 'idFinancialYear', 'idPeriod', 'idEmployee', 'idSubject', 'idWeekday'];

    public function period() {
        return $this->belongsTo(Period::class, 'idPeriod', 'idPeriod');
    }

    public function weekday() {
        return $this->belongsTo(Weekday::class, 'idWeekday', 'idWeekday');
    }

    public function teacher() {
        return $this->belongsTo(Employee::class, 'idEmployee', 'idEmployee');
    }

    public function subject() {
        return $this->belongsTo(Subject::class, 'idSubject', 'idSubject');
    }

}

Copyright © 2021 - 2025 IMMREX7