|
@@ -16,11 +16,11 @@ function call($method, $url, $data = false) {
|
16
|
16
|
return curl_exec($ch);
|
17
|
17
|
}
|
18
|
18
|
|
19
|
|
-$response = call('GET','http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1');
|
20
|
|
-$jsonObject = json_decode($response,true);
|
|
19
|
+$response = call('GET', 'http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1');
|
|
20
|
+$jsonObject = json_decode($response, true);
|
21
|
21
|
|
22
|
22
|
$jsonObject = php_crud_api_transform($jsonObject);
|
23
|
|
-$output = json_encode($jsonObject,JSON_PRETTY_PRINT);
|
|
23
|
+$output = json_encode($jsonObject, JSON_PRETTY_PRINT);
|
24
|
24
|
?>
|
25
|
25
|
<html>
|
26
|
26
|
<head>
|
|
@@ -29,3 +29,4 @@ $output = json_encode($jsonObject,JSON_PRETTY_PRINT);
|
29
|
29
|
<pre><?php echo $output ?></pre>
|
30
|
30
|
</body>
|
31
|
31
|
</html>
|
|
32
|
+
|