IMMREX7

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

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use App\Traits;

class TeacherSubject extends Model {

    use Traits\AutoUpdateUserColumns;

    protected $primaryKey = 'idTeacherSubject';
    protected $table = 'teacher_subjects';
    protected $fillable = ['idSchool', 'idFinancialYear', 'idEmployee', 'idClass', 'idSubject'];

    public function classM() {
        return $this->belongsTo(ClassM::class, 'idClass', 'idClass');
    }

    public function section() {
        return $this->belongsTo(Section::class, 'idSection', 'idSection');
    }

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

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

}

Copyright © 2021 - 2025 IMMREX7