Download the PHP package webhappens/prismic without Composer

On this page you can find all versions of the php package webhappens/prismic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package prismic

tests

A Laravel wrapper for Prismic.io

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

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

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:

Registering Document Models

Before Document models are available they must be registered in a Service Provider using the Prismic::documents() method. Typically this would happen in the register method of your App\Providers\AppServiceProvider class.

Retrieving Documets

Once you have created a Document model and its associated content in Prismic, you are ready to start retrieving data from your repository.

All Documents

You may retrieve all Documents for a specific type using the all method. They will be returned inside a Laravel Collection object:

Chunking Results

If you need to process a lot of Documents, use the chunk command. The chunk method will retrieve a "chunk" of Document models, feeding them to a given Closure for processing. This will conserve memory when working with large result sets:

Please note that the largest chunk size is 100 due to a limit on the Prismic API.

Single Documents

In addition to retrieving all Documents for a given type, you may also retrieve single records by passing the Document ID into the find method. Instead of returning a Laravel Collection, this method returns a single Document instance:

Single Type Documents

If you have created a Single Type Document, a Homepage, for example, you may use the single method to retrieve the Document model instance, without having to pass a Document ID:


All versions of prismic with dependencies

PHP Build Version
Package Version
Requires php Version 7.3 - 8
laravel/framework Version 7 - 10
prismic/php-sdk Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webhappens/prismic contains the following files

Loading the files please wait ....