Try
$oKubus->mengsel_temp = $request->get('mengsel_temp');
The Request::get() method will return null if the field was empty. You can also force a return value by setting it as the second parameter.
LaurentMeganck said:
Try
$oKubus->mengsel_temp = $request->get('mengsel_temp');
The Request::get() method will return null if the field was empty. You can also force a return value by setting it as the second parameter.
It's still not working. I even tried this:
$oKubus->mengsel_temp = null;
Which should just store this value as NULL, but somehow it stores it as a 00.0
what is type of this field in the database? you have to be sure about its type and also default value.
the decimal field in the database automatically set
the type is also decimal in the datebase. here is the migration part of the database:
$table->decimal('mengsel_temp', 3, 1)->nullable();
And I checked it in PHPmyAdmin it really is a decimal field.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community