PHP code example of tedbreedigital / prismic-laravel

1. Go to this page and download the library: Download tedbreedigital/prismic-laravel 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/ */

    

tedbreedigital / prismic-laravel example snippets


'providers' => [
    MikkoKut\PrismicLaravel\PrismicServiceProvider::class,
],

'aliases' => [
    'Prismic' => MikkoKut\PrismicLaravel\Facades\Prismic::class,
],

$type = 'frontpage';
$options = [];
$key = 'frontpage.title';

$document = \Prismic::getSingle($type, $options);
echo $document->getText($key);

php artisan key:generate

php artisan serve
bash
php composer 
sh
php artisan vendor:publish"