Download the PHP package karunais13/api-response-formatter without Composer
On this page you can find all versions of the php package karunais13/api-response-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download karunais13/api-response-formatter
More information about karunais13/api-response-formatter
Files in karunais13/api-response-formatter
Download karunais13/api-response-formatter
More information about karunais13/api-response-formatter
Files in karunais13/api-response-formatter
Vendor karunais13
Package api-response-formatter
Short Description Structure api response
License MIT
Package api-response-formatter
Short Description Structure api response
License MIT
Please rate this library. Is it a good library?
Informations about the package api-response-formatter
Response Formatter
This package allows to standardise and structure response. Especially for api. Structure of the response will be :
Installation
Install the usual composer way.
Run this command at root directory of your project
For Laravel 5.5 and below add provider in config file like below :
app/config/app.php
#
Configure
Copy the packages config to respective folder.
app/config/responsecode.php
Basic Usage
Import facade into the file and return it. Like below :
For Laravel :
Methods Available
res( $status, $code, $data )
- Gets Response message based on the code
- @param boolean $status
- @param integer $code
- @param string|object|array|null $data
resCustom( $status, $message, $data )
- Return response without code
- @param boolean $status
- @param string $message
- @param string|object|array|null $data
#
Change Alias (for laravel):
app/config/app.php
Example :
Licence
All versions of api-response-formatter with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package karunais13/api-response-formatter contains the following files
Loading the files please wait ....