/home/techb158/ileadtechnology.com/SSM/app/Models/configuration/exam
NameSizeModeActions
Assessment.php22480644editdlrm
AssessmentDetail.php17210644editdlrm
Grade.php22330644editdlrm
GradeDetail.php16700644editdlrm
Observation.php24010644editdlrm
ObservationDetail.php17330644editdlrm
ObservationRecord.php25350644editdlrm
Term.php21900644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/configuration/exam/Grade.php (2233B)
'array']; protected $primaryKey = 'id'; protected $table = 'exam_grades'; protected static $logName = 'exam_grade'; protected static $logFillable = true; protected static $logOnlyDirty = true; protected static $ignoreChangedAttributes = ['updated_at']; public function academicSession() { return $this->belongsTo('App\Models\Academic\AcademicSession'); } public function details() { return $this->hasMany('App\Models\Configuration\Exam\GradeDetail', 'exam_grade_id'); } public function schedules() { return $this->hasMany('App\Models\Exam\Schedule', 'exam_grade_id'); } public function batches() { return $this->hasMany('App\Models\Academic\Batch', 'exam_grade_id'); } public function getOption(string $option) { return array_get($this->options, $option); } public function scopeInfo($q) { return $q->with('details'); } public function scopeFilterById($q, $id) { if (! $id) { return $q; } return $q->where('id', '=', $id); } public function scopeFilterByName($q, $name, $s = 0) { if (! $name) { return $q; } return $s ? $q->where('name', '=', $name) : $q->where('name', 'like', '%'.$name.'%'); } public function scopeFilterByAcademicSessionId($q, $academic_session_id) { if (! $academic_session_id) { return $q; } return $q->where('academic_session_id', '=', $academic_session_id); } public function scopeFilterBySession($q, $session_id = null) { return $q->where('academic_session_id', '=', $session_id ? : config('config.default_academic_session.id')); } }