Problem 1 This is my nested array code
$product = $db->query("SELECT * FROM product")->fetchAll(PDO::FETCH_OBJ);
return $response
->withStatus(200)
->withHeader("Content-Type", 'application/json')
->withJson($product);
output
[
{
"product_id": "1",
"product_name": "Ahmet",
"product_price": "10.00",
"product_status": "",
"product_slung": "",
"product_property": "{\"p1\": 1, \"p2\": \"Leanne Graham\", \"o3\": \"Bret\"}",
"product_createdtime": "{\"date\": \"06.05.2020\", \"time\": \"23:19\"}"
}
]
{\"p1\": 1, \"p2\": \"Leanne Graham\", \"o3\": \"Bret\"} adding \ problem
Problem 2
No problem when you enter this way
http://as.localhost/api/product/
When I enter this way, I get such an error
http://as.localhost/api/product
"Page Not Found"