PHPackages                             tedbreedigital/prismic-laravel - 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. [API Development](/categories/api)
4. /
5. tedbreedigital/prismic-laravel

ActiveLibrary[API Development](/categories/api)

tedbreedigital/prismic-laravel
==============================

Laravel 5.6 Implementation Of Prismic PHP API

v0.1(8y ago)07MITPHPPHP &gt;=7.1.3

Since Apr 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dammyammy/prismic-laravel)[ Packagist](https://packagist.org/packages/tedbreedigital/prismic-laravel)[ Docs](http://opensource.tedbreedigital.com/prismic-laravel)[ RSS](/packages/tedbreedigital-prismic-laravel/feed)WikiDiscussions master Synced yesterday

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

```
# Laravel starter

This is a blank [Laravel](https://laravel.com) project that will connect to any prismic.io repository. It uses the prismic.io PHP development kit, and provides a few helpers to integrate with a Laravel website.

## Getting started

### Launch the starter project

*(Assuming you've [installed Laravel](https://laravel.com/docs/5.5/installation))*

Fork this repository, then clone your fork, and run this in your newly created directory:

``` bash
composer install
```

Next you need to make a copy of the `.env.example` file and rename it to `.env` inside your project root.

Run the following command to generate your app key:

```
php artisan key:generate
```

Then start your server:

```
php artisan serve
```

Your Laravel starter project is now up and running!

### Configure the starter project

Edit the `config/prismic.php` prismic configuration file to get the application connected to the correct repository:

```
'url' => 'https://your-repo-name.prismic.io/api/v2',
```

You may have to restart your server.

### Create your routes and pages

When the project is first launched and viewed, it will by default display a help page. Here you will find some documentation to help you get started with your Laravel project.

It includes an example that shows how to create a route and query a document of the custom type "page". It then shows how to integrate the content into the Laravel templates.

Check it out to get a better understanding of how you would create your own routes and templates for your project. You can also explore our documentation to learn more about how to [query the API](https://prismic.io/docs/php/query-the-api/how-to-query-the-api) and how to integrate content fields like [Rich Text](https://prismic.io/docs/php/templating/rich-text), [Images](https://prismic.io/docs/php/templating/image), and more.

## Deploying your Laravel application

Once you've created your website, an easy way to deploy your Laravel application is to use [Heroku](http://www.heroku.com). Just follow these few simple steps once you have successfully [signed up](https://id.heroku.com/signup/www-header) and [installed the Heroku toolbelt](https://toolbelt.heroku.com/):

Create a new Heroku application

```
$ heroku create
```

Initialize a new Git repository:

```
$ git init
$ heroku git:remote -a your-heroku-app-name
```

Commit your code to the Git repository if you haven't already:

```
$ git add .
$ git commit -am "make it better"
```

Set a Laravel encryption key:

```
$ heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)
```

Push to Heroku:

```
$ git push heroku master
```

You can now browse your application online:

```
$ heroku open
```

You can read more about launching your project with Heroku here in their [Laravel & Heroku guide](https://devcenter.heroku.com/articles/getting-started-with-laravel).

## Learn more about prismic.io

If you are looking for more resources to learn more about prismic.io, you can find out [how to get started with prismic.io](https://prismic.io/quickstart#?lang=php) and learn more by exploring [our full documentation](https://prismic.io/docs/php/getting-started/with-the-php-starter-kit).

### Understand the PHP development kit

You'll find more information about how to use the development kit included in this starter project, by reading its README file and exploring its project files on GitHub [prismic/php-kit](https://github.com/prismicio/php-kit).

## Licence

This software is licensed under the Apache 2 license, quoted below.

Copyright 2018 Prismic.io (https://prismic.io).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

# Prismic.io Laravel Integration

[![Build Status](https://travis-ci.org/mikkokut/prismic-laravel.svg?branch=master)](https://travis-ci.org/mikkokut/prismic-laravel)

Laravel integration for the Prismic PHP development kit.

[Prismic](https://prismic.io) provides one CMS Backend for all your Websites & Apps.

# Setup

To add this package to your `composer.json` and install it execute the following command:

```bash
php composer require mikkokut/prismic-laravel
````
Add the service provider to the `providers` array in config/app.php:

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

Add the facade to the `aliases` array in config/app.php:
```php
'aliases' => [
    'Prismic' => MikkoKut\PrismicLaravel\Facades\Prismic::class,
],
```

## Configuration

Publish the config file:

```sh
php artisan vendor:publish"
```

This will add prismic.php to your /config folder. Next, open that file and set the credentials.

## Usage

The package just initializes the Api class of the Prismic's php-kit package. You can use all public methods from the [Api](https://github.com/prismicio/php-kit/blob/master/src/Prismic/Api.php) using the Prismic facade.

### Eq. Get single
```php
$type = 'frontpage';
$options = [];
$key = 'frontpage.title';

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

### Available methods
Refer [php-kit](https://github.com/prismicio/php-kit)

License
=======

Copyright (c) 2017 Mikko Kutilainen. Code released under the MIT license.
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2949d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fc71188bc2b234fee46522603035ae0c240b9c714a687c26043039385fc914a?d=identicon)[dammyammy](/maintainers/dammyammy)

---

Top Contributors

[![dammyammy](https://avatars.githubusercontent.com/u/3688497?v=4)](https://github.com/dammyammy "dammyammy (3 commits)")

---

Tags

laravelprismicioapilaravelcmsPrismicheadless cmscontent management systemsTedbree Digital

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tedbreedigital-prismic-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/tedbreedigital-prismic-laravel/health.svg)](https://phpackages.com/packages/tedbreedigital-prismic-laravel)
```

###  Alternatives

[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6272.7k4](/packages/riclep-laravel-storyblok)[joy/voyager-api

This Laravel/Voyager module adds REST Api with swagger support to Voyager.

204.7k3](/packages/joy-voyager-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
