PHPackages                             webhappens/prismic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. webhappens/prismic

ActiveLibrary

webhappens/prismic
==================

A Laravel package for using Prismic.io

v0.8.6(3y ago)51.4k2[3 issues](https://github.com/webhappens/prismic/issues)MITPHPPHP 7.3 - 8CI failing

Since May 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/webhappens/prismic)[ Packagist](https://packagist.org/packages/webhappens/prismic)[ Docs](https://github.com/webhappens/prismic)[ RSS](/packages/webhappens-prismic/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (5)Versions (23)Used By (0)

[![tests](https://github.com/webhappens/prismic/workflows/tests/badge.svg)](https://github.com/webhappens/prismic/workflows/tests/badge.svg)

A Laravel wrapper for Prismic.io
================================

[](#a-laravel-wrapper-for-prismicio)

This package makes it super quick and easy to work with Prismic.io in Laravel.

- Object-oriented design
- Eloquent-style query interface
- Auto-magically render Slices and Fields as HTML
- Automatic link resolution
- Nested Document support
- Out-the-box caching and preview sessions
- Super-charged web hooks (Coming soon)

Documents
---------

[](#documents)

Each Custom Type within Prismic should have a corresponding Document model in your project. Document models make it easy for you to query your Prismic repository and organise your code around your content models.

### Defining Document Models

[](#defining-document-models)

To get started, let's create a Document model. All Document models extend the `WebHappens\Prismic\Document` class.

The most basic and fundamental property of a Document model is its `type` property. This property indicates which Prismic Custom Type the Document model corresponds to:

```
