IMMREX7
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Traits;
class Subject extends Model {
//
use Traits\AutoUpdateUserColumns;
protected $primaryKey = 'idSubject';
protected $table = 'subjects';
protected $fillable = ['idClass', 'idFinancialYear', 'subjectName', 'subjectCode'];
public function classM() {
return $this->belongsTo(ClassM::class, 'idClass', 'idClass');
}
public function fys() {
return $this->belongsTo(FinancialYear::class, 'idFinancialYear', 'idFinancialYear');
}
}
Copyright © 2021 -