Download the PHP package aejnsn/lapis without Composer

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

lapis

A toolkit building on API Resources in Laravel.

Build Status Coverage Status


Concept

RESTful API endpoints typically require more functionality than pagination alone. For example, a front-end or mobile application may implement a filtering scheme or require access to the endpoint's nested resources. Lapis intends to provide a lightweight filtering and nested resource pattern leveraging the existing facilities in Laravel 5.5.

Includes

Let's say we have an endpoint in a blogging platform to list our post resources returning a response like so:

Ideally we would want to see details of a post's author in our front-end. Right, so make another request to a hypothetical users endpoint referencing a distinct list of authorIds from the posts response...No, absolutely not! We (hopefully) spent the time in our blogging platform's backend to model our data's relationships and set up foreign key constraints with appropriate indices. So let's put those models to work.

Lapis, leveraging Laravel's API Resources, allows us to add an include parameter on our request URL to retrieve the nested author (User) relationship. Our request URL and response would look something like this:

GET https://api.myrecipeblog.com/posts?include=author

Nested Includes

This will also work for nested relationships. For example, if our User model contained a favorites relationship we could request GET https://api.myrecipeblog.com/posts?include=author.favorites and an array of the author's favorites would be nested inside the author object.

Filtering

Let's go back to our original response above, for which we called the posts endpoint. Maybe we only want to see posts from the drinks category. We could alter our call from above like so:

GET https://api.myrecipeblog.com/posts?filter[category]=drinks

We can also specify multiple filters using this structure:

GET https://api.myrecipeblog.com/posts?filter[category]=drinks&filter[authorId]=15

Nested Filters

We discussed including an author relationship above. We can also filter on the author's details by making a request like so:

GET https://api.myrecipeblog.com/posts?filter[author.forHire]=true

Filter Operators

Up until this point we've just used filters to assert a field is equal to a given value. Filters understand the concept of operators. Here are a few examples:

List posts later than October 1, 2017.

GET https://api.myrecipeblog.com/posts?filter[postedAt{gte}]=2017-10-01

List posts where the author's name starts with John.

GET https://api.myrecipeblog.com/posts?filter[author.name{starts}]=John

Reference Implementation

Installation & Usage


All versions of lapis with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
illuminate/database Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~5.9.0
illuminate/support Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~5.9.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 aejnsn/lapis contains the following files

Loading the files please wait ....