californiamountainsnake / json-response
The json-response object for uniformity of responses api
Installs: 137
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 1
pkg:composer/californiamountainsnake/json-response
Requires
- php: ^7.1
- ext-json: *
- illuminate/http: *
- psr/log: ^1.1
Requires (Dev)
- ext-dom: *
- phpunit/phpunit: ^7.0
README
A simple object for creating api responses.
Install:
Require this package with Composer
Install this package through Composer.
Edit your project's composer.json file to require californiamountainsnake/json-response:
{
"name": "yourproject/yourproject",
"type": "project",
"require": {
"php": "^7.1",
"californiamountainsnake/json-response": "*"
}
}
and run composer update
or
run this command in your command line:
composer require californiamountainsnake/json-response
Usage examples:
<?php use CaliforniaMountainSnake\JsonResponse\JsonResponse; return JsonResponse::error(['error_1', 'error_2', 'error_3'], JsonResponse::HTTP_BAD_REQUEST)->make();