I have the following code in a controller file
$customer->update([
'name' => $request->input('name'),
'address' => $request->input('address'),
'phone' => $request->input('phone'),
'percentage' => $request->input('percentage')
]);
which successfully updates everything except the percentage field which is of type DECIMAL(2,2)
I get no error messages but in my table the percentage value stays the same. I have tried replacing with a hardcoded decimal value to no avail either.
3
Answers
check if you are passing the correct name/id for your data.
You might be forget to add
percentage
field to fillable in model.Check your model.
hope this work for you.
Make sure you have allocated the value size in the column and check if it matches your updated value size