PHP code example of ptinosq / prismic4d

1. Go to this page and download the library: Download ptinosq/prismic4d library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ptinosq / prismic4d example snippets



pTinosq\Prismic4D;

$api = new Prismic4D\API();
$api->setProjectName('my-project-name');
$api->setAccessToken('my-access-token');

$ref = $api->getRef();
$document = $api->getDocument($ref, 'my-document-id');