/home/techb158/ileadtechnology.com/SSM/app/Models/employee
NameSizeModeActions
Attendance.php32100644editdlrm
AttendanceDetail.php20930644editdlrm
Employee.php85730644editdlrm
EmployeeAccount.php19260644editdlrm
EmployeeDesignation.php18750644editdlrm
EmployeeDocument.php19990644editdlrm
EmployeeQualification.php17240644editdlrm
EmployeeTerm.php15350644editdlrm
LeaveAllocation.php24080644editdlrm
LeaveAllocationDetail.php16280644editdlrm
LeaveRequest.php35270644editdlrm
LeaveRequestDetail.php18310644editdlrm
Payroll.php33810644editdlrm
PayrollDetail.php12650644editdlrm
PayrollTemplate.php21430644editdlrm
PayrollTemplateDetail.php15800644editdlrm
Salary.php31560644editdlrm
SalaryDetail.php17880644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/employee/Attendance.php (3210B)
'array', 'date_of_attendance' => 'date']; protected $primaryKey = 'id'; protected $table = 'employee_attendances'; protected static $logName = 'employee_attendance'; protected static $logFillable = true; protected static $logOnlyDirty = true; protected static $ignoreChangedAttributes = ['updated_at']; public function employee() { return $this->belongsTo('App\Models\Employee\Employee'); } public function attendanceType() { return $this->belongsTo('App\Models\Configuration\Employee\AttendanceType','employee_attendance_type_id'); } public function attendanceDetails() { return $this->hasMany('App\Models\Employee\AttendanceDetail','employee_attendance_id'); } public function getOption(string $option) { return array_get($this->options, $option); } public function scopeInfo($q) { return $q->with([ 'employee:id,code,prefix,first_name,middle_name,last_name', 'employee.employeeDesignations:id,employee_id,designation_id,department_id,date_effective,date_end', 'employee.employeeDesignations.designation:id,name,employee_category_id', 'employee.employeeDesignations.designation.employeeCategory:id,name', 'employee.employeeDesignations.department:id,name', 'attendanceType:id,name,type,alias', 'attendanceDetails:id,employee_attendance_id,employee_attendance_type_id,value,remarks', 'attendanceDetails.attendanceType:id,name,type,alias,unit' ]); } public function scopeFilterById($q, $id) { if (! $id) { return $q; } return $q->where('id', '=', $id); } public function scopeFilterByEmployeeId($q, $employee_id) { if (! $employee_id) { return $q; } return $q->where('employee_id', '=', $employee_id); } public function scopeFilterByDateOfAttendance($q, $date_of_attendance) { if (! $date_of_attendance) { return $q; } return $q->where('date_of_attendance', '=', $date_of_attendance); } public function scopeFilterByEmployeeAttendanceTypeId($q, $employee_attendance_type_id) { if (! $employee_attendance_type_id) { return $q; } return $q->where('employee_attendance_type_id', '=', $employee_attendance_type_id); } public function scopeFilterBySession($q) { return $q->where('date', '>=', getStartOfDate(config('config.default_academic_session.start_date')))->where('date', '<=', getEndOfDate(config('config.default_academic_session.end_date'))); } }