Fix Area Limit Setter

This commit is contained in:
2022-07-27 14:24:11 +07:00
parent 51e7567b91
commit b73d012781

View File

@@ -132,6 +132,11 @@ class Benefit extends Model
"Show Benefit Value" => 'show_benefit_value',
];
public function setAreaLimitAttribute($value)
{
$this->attributes['area_limit'] = $value ? $value : null;
}
public function setPrePostTreatmentAttribute($value)
{
$this->attributes['pre_post_treatment'] = empty($value) ? null : ($value == 'Y');