IMMREX7
<?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 -