Download the PHP package guanguans/laravel-api-response without Composer

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

laravel-api-response

Normalize and standardize Laravel API response data structures. - 规范化和标准化 Laravel API 响应数据结构。

tests check & fix styling codecov Latest Stable Version GitHub release (with filter) Total Downloads License

Features

Requirement

Installation

Configuration

Publish files(optional)

Usage

Quick start

details json * { * "status": false, * "code": 500, * "message": "This is a runtime exception.", * "data": {}, * "error": { * "message": "This is a runtime exception.", * "exception": "RuntimeException", * ... * "trace": [ * ... * ] * } * } *

Default response structure

details

Default response examples

model
eloquent collection
simple paginate
resource
resource collection
error
exception
debug exception
exception handler
locale exception
more examples... * [feature](tests/Feature) * [examples](tests/__snapshots__)

FAQ

How to customize pipe * Reference to the [Pipes](src/Pipes) * Simple example:
How to customize exception pipe * Reference to the [ExceptionPipes](src/ExceptionPipes)
How to customize pipe in a single api * Reference to the [HasPipes.php](src/Concerns/HasPipes.php)、[HasExceptionPipes.php](src/Concerns/HasExceptionPipes.php) * Simple example:
How to always respond with successful http status code * Reference to the [StatusCodePipe.php](src/Pipes/StatusCodePipe.php) * Remove the configuration `api-response.pipes.StatusCodePipe`
How to localize message * Reference to the [MessagePipe.php](src/Pipes/MessagePipe.php) * Install [Laravel-Lang/http-statuses](https://github.com/Laravel-Lang/http-statuses) `composer require --dev laravel-lang/http-statuses` or create lang files `resources/lang/***/http-statuses.php`
Shortcut methods of http status * Reference to the [ConcreteHttpStatus.php](src/Concerns/ConcreteHttpStatus.php)

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

Thanks

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-api-response with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
laravel/framework Version ^8.83 || ^9.0 || ^10.0 || ^11.0
spatie/laravel-package-tools Version ^1.12
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 guanguans/laravel-api-response contains the following files

Loading the files please wait ....