If I have a column like this ‘price’ as decimal, when I get this value from Database, it returns a string instead of decimal or float. How can I fix this?
If I have a column like this ‘price’ as decimal, when I get this value from Database, it returns a string instead of decimal or float. How can I fix this?
2
Answers
you can solve it in the whole project by casting in model
example:
documentation link:
click here
You can just do this before showing;
Or you can make a function, it will work.