Download the PHP package brooksyang/laravel-api-helper without Composer

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

Build Status

介绍

该项目是基于 Laravel 5.5 的API文档生成工具,根据 laravel 路由及注释文件生成可视化 api 文档,内置接口调试工具。

Demo

点击访问

项目依赖

依赖包 版本
PHP >=7.0
Laravel >=5.5
predis >=1.1
Guzzlehttp(2.0版本已废弃) >=6.3

更新日志

v2.0.0 2019-03-29

  • 重构 移除 GuzzleHttp 依赖,接口测试改用 Laravel 内置的 Request 类请求
  • 重构 移除 ResponseHelper Trait

v1.6.0 2019-03-19

  • 新增 支持资源路由(参数接收方式见「使用示例」)
  • 新增 内置接口访问统计(需启用 request.counter 中间件)

v1.5.4 2019-03-19

  • 新增 请求 api 设置 Accept 为 json

v1.5.3 2019-03-01

  • 优化 样式调整

v1.5.2 2019-03-01

  • 新增 可选是否开启文档功能,默认开启
  • 优化 移除js公共资源

v1.5.1 2019-03-01

  • 优化 文件结构调整

v1.5.0 2019-03-01

  • 新增 测试工具提供 Pretty、Raw、Preview 三种响应结果视图

v1.4.7 2019-02-28

  • 新增 压力测试调整为可选功能,默认关闭

v1.4.6 2019-02-28

  • 优化 压缩css文件

v1.4.5 2019-02-28

  • 新增 测试工具允许使用 dd、dump、echo 等方法直接打印数据
  • 优化 测试工具返回完整异常信息

v1.4.4 2018-07-20

  • 优化 左侧菜单样式优化

v1.4.3 2018-06-28

  • 优化 模块分组优化

v1.4.2 2018-06-28

  • 新增 新增模块分组功能,以区分不同命名空间下的重名文件夹

v1.4.1 2018-06-24

  • 修复 修复api-helper配置文件的bug

v1.4.0 2018-06-24

  • 新增 可指定文档生成的命名空间,向下兼容v1.3,默认命名空间为App\Http\Controllers

v1.3.2 2018-03-31

  • 优化 压力测试安全机制优化

v1.3.0 2018-02-13

  • 新增表单支持文件上传

v1.2.0 2018-01-22

  • 新增 新增ResponseHelper Trait,封装常用api返回方法

v1.1.1 2018-01-22

  • 新增 Guzzle 请求异常处理

v1.1.0 2017-12-18

  • 新增 支持在线ApacheBench服务器压力测试,并缓存最近一次压测结果,在接口列表及详情页展示

安装

配置

打印配置文件,及静态资源,该命令将生成 config/api-helper.php,及 /public/vendor/api_helper 文件夹

api-helper.php 配置项说明

注意:请确保所配置的命名空间下存在次级命名空间,否则将被忽略,次级命名空间将作为模块名,更深层次命名空间与次级命名空间同级,例:

namespaces 配置示例

该配置中,「App」包含「Test」,「App」与「Api」同级,所以「Test」被忽略

代码目录结构

以上配置,TestController被忽略,DemoController 生效,DeepController与DemoController同级生效,XxxController生效

启用接口访问统计(可选)

vim app/Http/Kernel,在 $middlewareGroups 中添加 'request.counter' 中间件

设置缓存驱动

修改 .env 文件,将缓存驱动设置为redis(推荐)

若本机没有安装redis,可暂时设置为array

使用示例

注意

若设置了redis驱动,添加了新的api之后,需执行清除缓存操作(若缓存驱动为array,则跳过该步骤)

访问地址

TODO LIST


All versions of laravel-api-helper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version >=5.5
predis/predis Version >=1.1
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 brooksyang/laravel-api-helper contains the following files

Loading the files please wait ....