Download the PHP package robindrost/prismic-integration-field-laravel without Composer

On this page you can find all versions of the php package robindrost/prismic-integration-field-laravel. 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-integration-field-laravel

Prismic integration field for Laravel

This package allows you to use Eloquent models as Prismic integration fields. You must implement an interface and have an option to use the trait on your models.

The package also provides a middleware that will verify the access tokens from Prismic.

Installation

Usage

You can use the implementation of the integration field on your model in two ways.

  1. You either specify the fields in the database that are required by the integration field.
  2. Or your define attribute accessor methods like getImageUrlAttribute().

Model implementation example

Please note that I use a mix of option 1 and 2 here just as an example.

Collection implementation

And thats about it. Prismic can now handle the array returned by your collection.

Working with access tokens

This package also provide an easy way of protecting routes with access tokens. Prismic allows you to define access tokens for each integration field. These access tokens need to be defined in the config file and used by the middleware provided by this package.

  1. First publish the configuration file to your config folder.

And choose the service provider from this package.

  1. Now add access tokens inside the added configuration file. This is just an array of strings.

Apply the middleware on your routes

  1. Add the middleware to your app/Http/Kernel.php.

  2. Apply the middleware on your api routes:

Now only allowed access tokens will reach the controller.


All versions of prismic-integration-field-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
illuminate/support Version ^7.0 || ^8.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 robindrost/prismic-integration-field-laravel contains the following files

Loading the files please wait ....