borisnedovis / api-response
Api Response
dev-master
2019-11-05 17:55 UTC
This package is auto-updated.
Last update: 2025-05-06 06:02:11 UTC
README
Install
To install through Composer, by run the following command:
composer require borisnedovis/api-response
And add provider in app.php:
BorisNedovis\ApiResponse\Providers\ApiResponseServiceProvider::class
Use:
- Required parameter $data
return response()->api($this->data, $this->errors, $this->statusCode);
Result:
{"data":{...},"errors":[],"status":200}