Download the PHP package everalan/api without Composer

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

A RESTful API package for the Laravel frameworks, Like dingo/api but more simple

Dingo\Api 的关系

借鉴了 Dingo\Api,但是放弃了对系统的侵入式修改,例如

Everalan\Api 通过使用 HelpersMiddleware 来显示的定制,并不对系统进行修改,但是又实现了大部分功能。
完全参照 Dingo\Api 的语法格式,可以轻松切换过来。

环境要求

  1. PHP >= 7.0
  2. Laravel >= 5.6

安装

用法

响应 Response

控制器通过添加 Helpers Trait,获取 $this->response() 能力,可以响应以下类型内容:

响应单个模型

响应模型集合

响应模型分页

响应数组

设置 Transformerinclude

不同于 Dingo\Api 只能通过 QueryStringinclude 参数来设置 Transformerinclude,你可以手动制定需要 include 的内容。

以上响应均通过 Fractal 来实现,include 参数格式请参考 Transformers

其他响应类型

中间件 Middleware

UseGuard

Laravel 默认的 Authenticate 中间件仅在需要登录的接口里提供服务,提供 Auth::user()、设置 guard 等功能。
使用 Everalan\Api\Http\Middleware\UseGuard 中间件可在你需要的任意页面实现设置 guard

License

MIT


All versions of api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
league/fractal Version ^0.18.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 everalan/api contains the following files

Loading the files please wait ....