Download the PHP package admin9/laravel-scramble-extensions without Composer

On this page you can find all versions of the php package admin9/laravel-scramble-extensions. 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-scramble-extensions

Laravel Scramble Extensions

为 Laravel 业务接口量身定制的 Scramble (OpenAPI 文档生成器) 扩展包。

主要功能:

三个功能模块均可通过配置文件独立开启或关闭。

安装

发布配置文件:

可选依赖

根据你使用的功能,按需安装对应的包:

配置

配置文件 config/scramble-extensions.php

功能说明

1. 业务响应信封包装 (Response)

自动将所有 200 响应包装为统一的业务信封结构。

控制器需要 use 配置中指定的 trait(默认 Mitoop\Http\RespondsWithJson),通过 $this->success()$this->error()$this->deny() 返回响应。

生成的 OpenAPI 文档中,标准响应结构为:

分页响应会额外包含 meta 字段:

2. 场景化表单请求提取 (Scene FormRequest)

支持 mitoop/laravel-efficient-form-request,允许同一个 FormRequest 根据控制器方法名定义不同的验证规则。

扩展会自动查找 FormRequest 上的 {actionName}Rules() 方法并提取参数到 OpenAPI 文档。

store 接口文档会包含 name(必填)和 email(必填)参数,update 接口文档只包含 name 参数。

3. Filter 查询参数提取 (Filter)

支持 mitoop/laravel-query-builder,自动从 Filter 类中提取筛选字段、排序选项和分页参数到 OpenAPI 文档。

生成的文档会自动包含以下 query 参数:

License

MIT


All versions of laravel-scramble-extensions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
dedoc/scramble Version ^0.12 || ^0.13
nikic/php-parser Version ^4.0 || ^5.0
spatie/laravel-package-tools Version ^1.16
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 admin9/laravel-scramble-extensions contains the following files

Loading the files please wait ...