php - json response convert int to string problem laravelGet the solution ↓↓↓
I use the following command to output in Laravel :
response()->json($data, $status, )->send();
it has been converting all the numbers that are numerically defined in the database into strings Using the following value solves this problem, but this solution converts all numbers into numeric types
response()->json($data, $status, , JSON_NUMERIC_CHECK)->send();
And I do not want this to happen because there are numbers in the database that are from the string and should remain the string.
What should be done to display all values of their type in the output?
People are also looking for solutions of the problem: a non-numeric value encountered in
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.