Getting Started: Laravel

Install from composer.

composer require incraigulous/prismic-toolkit

Publish the config

You can use the configuration file to set your prismic credentials, define cache behavior, and webhook configuration.

php artisan vendor:publish  --provider="Incraigulous\PrismicToolkit\Providers\PrismicServiceProvider"

Add your prismic token and endpoint to your .env file.

PRISMIC_ENDPOINT=https://example.prismic.io/api
PRISMIC_TOKEN=sometoken

Migrate the database

php artisan migrate

Example usage

Prismic::getByUID('single', 'test-single')
    ->hero_image
    ->main
    ->getUrl();

results matching ""

    No results matching ""