hello everyone!
i've copy-paste the code of the tutorial 7, and when i test the insertion of a new robot with the curl in the example i receive these messages:
HTTP/1.1 409 Conflict
Server: Apache/2.4.17 (Win32) Open SSL/1.0.2d PHP/5.6.19
X-Powered-By: PHP/5.6.19
Status: 409 Conflict
Content-Length: 510
Content-Type application/json; charset=UTF-8
Notice: Trying to get property of non object in C:\...\index.php on line 134
Notice: Trying to get property of non object in C:\...\index.php on line 135
Notice: Trying to get property of non object in C:\...\index.php on line 136
{"status":"ERROR",messages":["id is required","name is required","type is required","year is required"]}
and here the lines:
<?php
$robot = $app->request->getJsonRawBody();
$phql = "INSERT INTO Robots (name, type, year) VALUES (:name:, :type:, :year:)";
/*133*/ $status = $app->modelsManager->executeQuery($phql, array(
/* 134 */ 'name' => $robot->name,
/* 135 */ 'type' => $robot->type,
/* 136 */ 'year' => $robot->year
));
someone knows what's is wrong?