TextInput integer save 0 as null
here is my code
if user put 0 into it, it saved as null instead of '0'
if user put 0 into it, it saved as null instead of '0'
TextInput::make('amount')
->integer()
->minValue(0)
->required()public function getAmountAttribute($value)
{
return $value ?? 0;
}