/home/techb158/ileadtechnology.com/SSM/app/Models/employee
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/employee/LeaveAllocationDetail.php (1628B)
'array'];
protected $primaryKey = 'id';
protected $table = 'employee_leave_allocation_details';
protected static $logName = 'employee_leave_allocation_detail';
protected static $logFillable = true;
protected static $logOnlyDirty = true;
protected static $ignoreChangedAttributes = ['updated_at'];
public function leaveAllocation()
{
return $this->belongsTo('App\Models\Employee\LeaveAllocation');
}
public function leaveType()
{
return $this->belongsTo('App\Models\Configuration\Employee\LeaveType','employee_leave_type_id');
}
public function getOption(string $option)
{
return array_get($this->options, $option);
}
public function scopeFilterById($q, $id)
{
if (! $id) {
return $q;
}
return $q->where('id', '=', $id);
}
public function scopeFilterByEmployeeLeaveTypeId($q, $employee_leave_type_id)
{
if (! $employee_leave_type_id) {
return $q;
}
return $q->where('employee_leave_type_id', '=', $employee_leave_type_id);
}
}