/home/techb158/ileadtechnology.com/SSM/app/Models/academic
NameSizeModeActions
AcademicSession.php30350644editdlrm
Batch.php35630644editdlrm
Certificate.php29890644editdlrm
ClassTeacher.php18460644editdlrm
ClassTiming.php25450644editdlrm
ClassTimingSession.php16680644editdlrm
Course.php28770644editdlrm
Subject.php31870644editdlrm
SubjectTeacher.php15730644editdlrm
Timetable.php25640644editdlrm
TimetableAllocation.php15850644editdlrm
TimetableAllocationDetail.php14260644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/academic/ClassTeacher.php (1846B)
'array', 'date_effective' => 'date']; protected $primaryKey = 'id'; protected $table = 'class_teachers'; protected static $logName = 'class_teacher'; protected static $logFillable = true; protected static $logOnlyDirty = true; protected static $ignoreChangedAttributes = ['updated_at']; public function batch() { return $this->belongsTo('App\Models\Academic\Batch'); } public function employee() { return $this->belongsTo('App\Models\Employee\Employee'); } public function scopeFilterById($q, $id) { if (! $id) { return $q; } return $q->where('id', '=', $id); } public function scopeFilterBySession($q) { return $q->whereHas('batch', function ($q1) { $q1->whereHas('course', function ($q2) { $q2->where('academic_session_id', '=', config('config.default_academic_session.id')); }); }); } public function scopeFilterByBatchId($q, $batch_id) { if (! $batch_id) { return $q; } return $q->where('batch_id', '=', $batch_id); } public function scopeFilterByEmployeeId($q, $employee_id) { if (! $employee_id) { return $q; } return $q->where('employee_id', '=', $employee_id); } }