Fix Empty String to Null

This commit is contained in:
2022-07-27 14:20:18 +07:00
parent 8b7b0b92a8
commit 51e7567b91
2 changed files with 14 additions and 9 deletions

View File

@@ -134,7 +134,7 @@ class Benefit extends Model
public function setPrePostTreatmentAttribute($value)
{
return empty($value) ? null : ($value == 'Y');
$this->attributes['pre_post_treatment'] = empty($value) ? null : ($value == 'Y');
}
public function getPrePostTreatmentAttribute($value)