Create and send a RESTful JSON response.
Return a RESTFull JSON response. The response body contains 3 properties.
MIT - MIT License File: LICENSE
<?php
$resp = new JSONResponse();
$resp->data[] = 'one';
$resp->data[] = 'two';
$resp->send();
composer require somephp/jsonresponse
Resource | Description |
---|---|
Suggestions and code modifications are welcome. Create a merge request, and tell me what are thinking.