Fix Empty String to Null
This commit is contained in:
@@ -134,7 +134,7 @@ class Benefit extends Model
|
|||||||
|
|
||||||
public function setPrePostTreatmentAttribute($value)
|
public function setPrePostTreatmentAttribute($value)
|
||||||
{
|
{
|
||||||
return empty($value) ? null : ($value == 'Y');
|
$this->attributes['pre_post_treatment'] = empty($value) ? null : ($value == 'Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPrePostTreatmentAttribute($value)
|
public function getPrePostTreatmentAttribute($value)
|
||||||
|
|||||||
@@ -114,29 +114,34 @@ class Plan extends Model
|
|||||||
"Max Periode of Surgery Non Surgery" => "max_surgery_periode_days",
|
"Max Periode of Surgery Non Surgery" => "max_surgery_periode_days",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function setAreaLimitAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['area_limit'] = empty($value) ? null : $value;
|
||||||
|
}
|
||||||
|
|
||||||
public function setStartAttribute($value)
|
public function setStartAttribute($value)
|
||||||
{
|
{
|
||||||
return empty($valu) ? null : $value;
|
$this->attributes['start'] = empty($value) ? null : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setEndAttribute($value)
|
public function setEndAttribute($value)
|
||||||
{
|
{
|
||||||
return empty($valu) ? null : $value;
|
$this->attributes['end'] = empty($value) ? null : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMaxClaimCount($value)
|
public function setMaxClaimCountAttribute($value)
|
||||||
{
|
{
|
||||||
return empty($value) ? null : $value;
|
$this->attributes['max_claim_count'] = empty($value) ? null : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMaxSurgeryReinstatementDays($value)
|
public function setMaxSurgeryReinstatementDaysAttribute($value)
|
||||||
{
|
{
|
||||||
return empty($value) ? null : $value;
|
$this->attributes['max_surgery_reinstatement_days'] = empty($value) ? null : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMaxSurgeryPeriodeDays($value)
|
public function setMaxSurgeryPeriodeDaysAttribute($value)
|
||||||
{
|
{
|
||||||
return empty($value) ? null : $value;
|
$this->attributes['max_surgery_periode_days'] = empty($value) ? null : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeFilter($query, array $filters)
|
public function scopeFilter($query, array $filters)
|
||||||
|
|||||||
Reference in New Issue
Block a user