{"id":15489495,"url":"https://github.com/kosmosx/response","last_synced_at":"2026-02-11T02:41:29.589Z","repository":{"id":57008646,"uuid":"156118853","full_name":"KosmosX/response","owner":"KosmosX","description":"Response HTTP package for Simfony, Laravel, Lumen and PHP 7 with standard REST API","archived":false,"fork":false,"pushed_at":"2019-06-19T17:44:28.000Z","size":100,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T20:55:45.972Z","etag":null,"topics":["hateoas-response","http-foundation","json-response","laravel","laravel-package","lumen","lumen-package","package","response-management","rest-api","restful-api","symfony","symfony-api","symfony-bundle"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/kosmosx/response","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KosmosX.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-04T19:50:53.000Z","updated_at":"2024-05-08T11:43:55.000Z","dependencies_parsed_at":"2022-08-21T13:10:48.391Z","dependency_job_id":null,"html_url":"https://github.com/KosmosX/response","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/KosmosX/response","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KosmosX%2Fresponse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KosmosX%2Fresponse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KosmosX%2Fresponse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KosmosX%2Fresponse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KosmosX","download_url":"https://codeload.github.com/KosmosX/response/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KosmosX%2Fresponse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269976794,"owners_count":24506467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hateoas-response","http-foundation","json-response","laravel","laravel-package","lumen","lumen-package","package","response-management","rest-api","restful-api","symfony","symfony-api","symfony-bundle"],"created_at":"2024-10-02T07:06:06.420Z","updated_at":"2026-02-11T02:41:29.534Z","avatar_url":"https://github.com/KosmosX.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documentation \n![](https://img.shields.io/badge/version-1.0.2-green.svg) \n![](https://img.shields.io/badge/Laravel-\u003e=7.1-blue.svg) \n![](https://img.shields.io/badge/Symfony-\u003e=4.2-blue.svg) \n\n### Let's go\n**Composer**\n\n    composer require kosmosx/response\n\n    require __DIR__ . '/vendor/autoload.php';\n    $response = new Kosmosx\\Response\\RestResponse();\n\n    $handler = Kosmosx\\Response\\Exceptions\\Handler();\n    $handler-\u003esetExceptionHandler();  \n\n**use it**\n\n    $response = new Kosmosx\\Response\\RestResponse($content, $status, $headers); //constructor\n    $response = new Kosmosx\\Response\\Factory\\FactoryResponse::success(); //factory\n    \n    $response-\u003ewithData(true); //add to json array with key 'data'\n    \n## Example\n\n    $response-\u003esuccess()\n             -\u003ewithData(['test' =\u003e true])\n             -\u003ewithData(['test2' =\u003e false])\n             -\u003ewithMessage('Microservice Lumen work')\n             -\u003ewithState();\n    \n    //response \t\t\t\t\n    {\n        \"data\": {\n            \"test\": true,\n            \"test2\": false\n        },\n        \"messages\": \"Microservice Lumen work\",\n        \"state\": \"OK\"\n    }\n    \n**en**: [documentation](https://github.com/FabrizioCafolla/response-http/wiki/Response-http-documentation)\n\n**it**: [documentazione](https://github.com/FabrizioCafolla/response-http/wiki/Documentazione-response-http)\n\n***\n\nIf you find a bug or want to contribute, write to developer@fabriziocafolla.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosmosx%2Fresponse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkosmosx%2Fresponse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosmosx%2Fresponse/lists"}