Download the PHP package laraluke/statamic-api-select without Composer

On this page you can find all versions of the php package laraluke/statamic-api-select. 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 statamic-api-select

API Select Fieldtype addon for Statamic

Utilise API endpoints for your Select Fieldtype options.

License

API Select requires a license.

You can purchase one at https://statamic.com/marketplace/addons/api-select

You may use API Select without a license while Statamic is in Trial mode.

Installation

Require it using Composer.

Publish the assets:

Using the API Select Fieldtype

Add the fieldtype to your fieldset/blueprint. You will then need to configure the following settings:

Endpoint Type

This is to define whether or not your endpoint value is a URL or a config variable.

Endpoint

If your endpoint type is a URL your endpoint value will look like this:

If your endpoint type is a config variable your endpoint value will look like this:

and your endpoints.php file would look something like this:

Cache Duration

This is how long API requests will be cached for in minutes.

Set this value to 0 if you don't want to cache results.

Data Set Key

If your data set isn't in the top-level of your API response you can define it's location using dot syntax.

So if your API result looks like:

You would set the data set key value to:

Item Key

Define the unique identifier to be used as the option value.

So if the iteration in your API result looks like this:

You might set your item key to:

Item Label

Define the value to be used as the option label.

So if the iteration in your API result looks like this:

You might set your item label to:

Using the API Select value in your templates

Let's assume your API select field handle is api_select_users API response is like so:

Single-choice API Select

Multi-choice API Select


All versions of statamic-api-select with dependencies

PHP Build Version
Package Version
No informations.
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 laraluke/statamic-api-select contains the following files

Loading the files please wait ....