Skip to content

Commit 1a1e116

Browse files
committed
example index udpate
1 parent 5c276cc commit 1a1e116

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

examples/index.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
</html>
99
<?php
1010
ini_set('display_errors', 'On');
11+
require_once __DIR__ . '/../src/contentstack.php';
12+
1113
use Contentstack\Contentstack;
12-
include_once "../src/index.php";
13-
include_once "../src/contentstackregion.php";
14-
$stack = Contentstack::Stack('', '', '', '');
14+
use Contentstack\Support\Utility;
15+
16+
$stack = Contentstack::Stack('', '', '');
1517
try {
1618
// \Contentstack\Utility\debug($stack);
1719
// $result = $stack->getContentTypes('{"include_snippet_schema": "false"}');
@@ -20,9 +22,9 @@
2022
// $result = $stack->ContentType('a')->Query()->includeSchema()->toJSON()->find();
2123
// $result = $stack->ContentType('ctwithallfields')->Query()->addParam('include_dimensions', true)->toJSON()->find();
2224
// $result = $stack->ContentType('a')->Entry('blta07130f8b344b260')->includeContentType()->toJSON()->fetch();
23-
// $result = $stack->Assets()->Query()->addParam('key', 'true')->toJSON()->find();
25+
$result = $stack->Assets()->Query()->includeFallback()->toJSON()->find();
2426
//$result = $stack->Assets('blt9b5825dd804a9067')->addParam('include_dimension', 'true')->fetch();
25-
// \Contentstack\Utility\debug(($result));
27+
Utility::debug(($result));
2628

2729
} catch(Exception $e) {
2830
echo "Message : ".$e->getMessage(); // returns message -> API -> error_message

0 commit comments

Comments
 (0)