Download the PHP package vespakoen/epi without Composer

On this page you can find all versions of the php package vespakoen/epi. 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 epi

Epi

Build Status

Creating an API can be a tedious task, and if you need to filter your data in specific ways, things are bound to get nasty. Epi comes with a controller that handles your basic CRUD tasks for an Eloquent model, but the index / "read all" method it where Epi really shines.

Imagine that you have a Page model that has got a relationship with a PageTranslation model. Perhaps you would want to retrieve a page by it's slug that lives in the PageTranslation model. With Epi, it would be a simple as requesting the following URL: api/pages?filter[translation.slug]=some-slug.

Installation

To add Epi to your Laravel application, follow these steps:

Add the following to your composer.json file:

Then, run composer update or composer install if you have not already installed packages.

Add the line below to the providers array (at the end) in the app/config/app.php configuration file:

Optionally, if you don't want to add "use" statements to your controller, add the line below to the aliases array (at the end) in the app/config/app.php configuration file:

Configuration

You will want to run the following command to publish the config to your application, otherwise it will be overwritten when the package is updated.

Usage

To build an Api using Epi we will need to create a controller that extends from the EpiController and is then registered with the router. First we need to create a controller, preferrably, this controller is seperated from the rest of your controllers by putting the controllers for the Api in a new folder. This folder could be app/controllers/api (make sure you add this path to the autoloader in app/start/global.php !) or /src/Somevendor/SomePackage/Controllers/Api depending on your situation.

Here is an example:

Now we need to register this controller with the router, which is as easy as adding the following lines to your app/routes.php file.

Done!

How does it work?

Under the hood Epi works it's magic to make all the good stuff happen, I can imagine you got curious how it works, to understand this, let's first take a look at the objects that live in the Epi codebase.

Manipulators

A manipulator is an object that modifies the query that will be made. Manipulators will also add and use aliases to avoid any conficts with self-referencing relationships. Epi comes with the following manipulators built-in.

Filter

Calls ->where() on the query and aliases tables

Join

Calls ->join() on the query and aliases tables

Limiter

Calls ->take() and optionally ->skip() on the query and aliases tables

Sorter

Calls ->orderBy() on the query and aliases tables

Extractors

Extractors get all the input, and have to make sure to extract the correct manipulators from them. Epi comes with the following extractors built-in.

FilterExtractor

...

JoinExtractor

...

LimiterExtractor

...

SorterExtractor

...

Relations

Epi has it's own Relation object for every Laravel relation, these objects have a ->getJoins() method that will returns Join manipulators that are needed for filtering or sorting on a related table.

More soon...


All versions of epi with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/support Version ~4
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 vespakoen/epi contains the following files

Loading the files please wait ....