Download the PHP package sevaske/api-response-payload without Composer
On this page you can find all versions of the php package sevaske/api-response-payload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package api-response-payload
API Response Payload
A small PHP library for building consistent API response payloads.
This package focuses on payload structure only and does not include any HTTP, framework, or transport-specific logic.
Installation
Purpose
This library solves a single problem:
Build predictable and extensible API response payloads
It intentionally does not:
- handle HTTP responses
- depend on any framework (Laravel, Symfony, etc.)
- enforce API semantics like
data,errors, or status codes
Those concerns belong to higher-level layers.
Basic Usage
Result:
Error Example
Customizing Keys
You can customize payload keys via the constructor:
Custom Success Values
The success indicator can be formatted as any scalar value:
Or:
Testing
License
MIT
All versions of api-response-payload with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0
The package sevaske/api-response-payload contains the following files
Loading the files please wait ...