Which variable did you dump?

|
rebory 2020-02-17 09:57:30
laravel_discuss-26753.jpg
i’m totally stucked here
rebory 2020-02-17 09:57:31
laravel_discuss-26755.jpg

rebory 2020-02-17 10:04:53
@skys215 @Rattone i need your help
skys215 2020-02-17 10:05:43
Code?
rebory 2020-02-17 10:07:42
skys215 2020-02-17 10:05:43
Code?

https://t.me/c/1333092984/26753

rebory 2020-02-17 10:08:33
rebory 2020-02-17 10:07:42
https://t.me/c/1333092984/26753

i hands up

skys215 2020-02-17 10:09:02
This is not code, it’s result
rebory 2020-02-17 10:10:15
skys215 2020-02-17 10:09:02
This is not code, it’s result

ok 1 second

rebory 2020-02-17 10:12:46
skys215 2020-02-17 10:09:02
This is not code, it’s result

laravel_discuss-26764.jpg

skys215 2020-02-17 10:14:46
Which variable did you dump?
rebory 2020-02-17 10:15:19
$data2
skys215 2020-02-17 10:16:36
you’ve got 3 dumps
skys215 2020-02-17 10:17:20
and due to IEEE754, it’s recommended to use integer the double/float in database
rebory 2020-02-17 10:17:24
dd($data2 , $payment , $update_order);
skys215 2020-02-17 10:17:25
https://0.30000000000000004.com/
skys215 2020-02-17 10:18:31
rebory 2020-02-17 10:17:24
dd($data2 , $payment , $update_order);

try dd the result of stringToFloat

rebory 2020-02-17 10:21:37
skys215 2020-02-17 10:18:31
try dd the result of stringToFloat

i got output of 22.0

rebory 2020-02-17 10:21:47
skys215 2020-02-17 10:18:31
try dd the result of stringToFloat

when i dd

rebory 2020-02-17 10:21:48
$var = “22.00”;
dd(stringToFloat($var));
rebory 2020-02-17 10:22:49
skys215 2020-02-17 10:17:25
https://0.30000000000000004.com/

i got accurate calculations before saving in database

rebory 2020-02-17 10:23:05
laravel_discuss-26776.jpg

skys215 2020-02-17 10:24:37
Try simply getting data from id and dump it
rebory 2020-02-17 10:27:28
skys215 2020-02-17 10:24:37
Try simply getting data from id and dump it

after saving?

skys215 2020-02-17 10:28:04
rebory 2020-02-17 10:27:28
after saving?

ofcourse! unless how to get data with id?

rebory 2020-02-17 10:29:15
skys215 2020-02-17 10:28:04
ofcourse! unless how to get data with id?

laravel_discuss-26780.jpg

skys215 2020-02-17 10:31:22
rebory 2020-02-17 10:29:15

try using stringToFloat on those fields

rebory 2020-02-17 10:35:12
skys215 2020-02-17 10:31:22
try using stringToFloat on those fields

same result 99.00

skys215 2020-02-17 10:36:24
Then try next step, array_sum
skys215 2020-02-17 10:36:45
It’s better to try with the record which appeared miscalculation
rebory 2020-02-17 10:40:01
skys215 2020-02-17 10:36:45
It’s better to try with the record which appeared miscalculation

issue is value not stored after decimal

rebory 2020-02-17 10:40:34
it save 00 after decimal
skys215 2020-02-17 10:41:02
Decimal?
rebory 2020-02-17 10:41:53
skys215 2020-02-17 10:41:02
Decimal?

example 20.99 it save only 20.00

rebory 2020-02-17 10:42:04
skip.99
skys215 2020-02-17 10:42:37
No, I mean, set your field as integer, and save 2099 instead of 20.99
skys215 2020-02-17 10:42:49
It will be less complicated
rebory 2020-02-17 10:44:04
skys215 2020-02-17 10:42:37
No, I mean, set your field as integer, and save 2099 instead of 20.99

no data type working for me like decimal, double, float so why i used or try integer for save float value

skys215 2020-02-17 10:53:21
I assumed that decimal/double/float just stores dot”.” for you
doing math over integer is much reliable than decimal/double/float, you just need to divide it by 100 before showing to user, that’s easier than handling issues with addition/substraction over float numbers
2020-02-17 11:18:01
hello..when i click update button, it does not update the values..what can be the problem
skys215 2020-02-17 11:18:25
2020-02-17 11:18:01
hello..when i click update button, it does not update the values..what can be the problem

debug step by step by yourself

AlkaouDembele 2020-02-17 11:19:47
hello world, i want deploy my app Laravel 6 in Heroku, i got this error ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘https://git.heroku.com/desolate-mountain-10815.git’
skys215 2020-02-17 11:24:52
AlkaouDembele 2020-02-17 11:19:47
hello world, i want deploy my app Laravel 6 in Heroku, i got this error ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘https://git.heroku.com/desolate-mountain-10815.git’

Sorry I never worked with heroku before

alexanderdavii 2020-02-17 11:49:31
laravel_discuss-26798.jpg
i am wroking on restfull api , and i have a PUT request to change the mobile number , but somthing is wrong it’s function
skys215 2020-02-17 11:51:53
alexanderdavii 2020-02-17 11:49:31
i am wroking on restfull api , and i have a PUT request to change the mobile number , but somthing is wrong it’s function

What is something?

Z_Yamin 2020-02-17 11:55:49
Hello evry one!
How to save array request in database
alexanderdavii 2020-02-17 11:56:43
skys215 2020-02-17 11:51:53
What is something?

laravel_discuss-26801.jpg

alexanderdavii 2020-02-17 11:57:05
skys215 2020-02-17 11:51:53
What is something?

it’s return 200 , but nothing changed in the DB

Z_Yamin 2020-02-17 11:57:18
laravel_discuss-26803.jpg
this data come from post request, how can i get it in controller and save it in database?
Z_Yamin 2020-02-17 11:58:58
alexanderdavii 2020-02-17 11:57:05
it’s return 200 , but nothing changed in the DB

you returend 200 for error and also for success,

Z_Yamin 2020-02-17 11:59:30
how you know which one returend
|