{"id":21800310,"url":"https://github.com/antare74/response-formatter","last_synced_at":"2025-07-20T05:30:55.168Z","repository":{"id":41376370,"uuid":"509334033","full_name":"antare74/response-formatter","owner":"antare74","description":"I created this package to make it easier to format the response from a controller. I have used this package in my projects and I hope you enjoy it!","archived":true,"fork":false,"pushed_at":"2022-11-03T05:24:19.000Z","size":15,"stargazers_count":19,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T17:50:42.181Z","etag":null,"topics":["bettercodehub","collaborate","educative","github","github-campus-experts","gitlens","laravel","learn","php","student-vscode"],"latest_commit_sha":null,"homepage":"","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/antare74.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["antare74"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-07-01T05:41:20.000Z","updated_at":"2025-03-19T03:14:40.000Z","dependencies_parsed_at":"2023-01-21T12:01:26.913Z","dependency_job_id":null,"html_url":"https://github.com/antare74/response-formatter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/antare74/response-formatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antare74%2Fresponse-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antare74%2Fresponse-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antare74%2Fresponse-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antare74%2Fresponse-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antare74","download_url":"https://codeload.github.com/antare74/response-formatter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antare74%2Fresponse-formatter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266071519,"owners_count":23871940,"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","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":["bettercodehub","collaborate","educative","github","github-campus-experts","gitlens","laravel","learn","php","student-vscode"],"created_at":"2024-11-27T10:45:51.090Z","updated_at":"2025-07-20T05:30:54.877Z","avatar_url":"https://github.com/antare74.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"\" rel=\"noopener\"\u003e\n \u003cimg width=200px height=200px style=\"border-radius:50%\" src=\"https://avatars.githubusercontent.com/u/52792087?v=4\" alt=\"Project logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eLaravel Response Formatter\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Status](https://img.shields.io/badge/status-active-success.svg)]()\n[![GitHub Issues](https://img.shields.io/github/issues/antare74/response-formatter.svg)](https://github.com/antare74/response-formatter/issues)\n[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/antare74/response-formatter.svg)](https://github.com/antare74/response-formatter/pulls)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)\n\n\u003c/div\u003e\n\n---\n\n\u003cp align=\"center\"\u003e I created this package to make it easier to format the response from a controller. I have used this package in my projects and I hope you enjoy it!\u003c/p\u003e\n    \u003cbr\u003e \n\u003c/p\u003e\n\n## 📝 Table of Contents\n\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Usage](#usage)\n- [Contributing](../CONTRIBUTING.md)\n- [Authors](#authors)\n- [Acknowledgments](#acknowledgement)\n\n## 🧐 About \u003ca name = \"about\"\u003e\u003c/a\u003e\nIt is a simple package that allows you to format your response in a consistent way. This might be useful for your API, or for your front-end.\n## 🏁 Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\nThese instructions will help you get started with your project.\n\n### Prerequisites\n\nWhat things you need to install the software and how to install them.\n\n```\ncomposer\n```\n```\nLaravel Version: \u003e= 5.8\n```\n\n### Installing\n\nA step by step series of examples that tell you how to get a development env running.\n\n```\ncomposer require antare74/response-formatter\n```\n\n## 🎈 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nExample Usage.\n```\n\u003c?php\n\nuse Illuminate\\Support\\Facades\\Route;\nuse Antare74\\ResponseFormatter\\Format;\n\n/*\n|--------------------------------------------------------------------------\n| Web Routes\n|--------------------------------------------------------------------------\n|\n| Here is where you can register web routes for your application. These\n| routes are loaded by the RouteServiceProvider within a group which\n| contains the \"web\" middleware group. Now create something great!\n|\n*/\n\nRoute::get('/success', function () {\n    return Format::success([\n        'name' =\u003e 'Antare74',\n        'age' =\u003e '74',\n        'address' =\u003e 'Jakarta',\n    ], 'Success Message');\n});\n\nRoute::get('/error', function () {\n    return Format::error([\n        'my_error_data' =\u003e 'Error Message',\n    ], 'Error Message', 500);\n});\n\n```\nExample Success Response.\n```\n{\n  \"meta\": {\n    \"code\": 200,\n    \"status\": \"success\",\n    \"message\": \"Success Message\",\n    \"is_paginated\": false\n  },\n  \"pagination\": [\n    \n  ],\n  \"data\": {\n    \"name\": \"Antare74\",\n    \"age\": \"74\",\n    \"address\": \"Jakarta\"\n  }\n}\n```\n\nExample Error Response.\n```\n{\n  \"meta\": {\n    \"code\": 500,\n    \"status\": \"error\",\n    \"message\": \"Error Message\",\n    \"is_paginated\": false\n  },\n  \"data\": {\n    \"my_error_data\": \"Error Message\"\n  }\n}\n```\n## ✍️ Authors \u003ca name = \"authors\"\u003e\u003c/a\u003e\n\n- [@antare74](https://github.com/antare74) - IDK\n\nSee also the list of [contributors](https://github.com/antare74) who participated in this project.\n\n## 🎉 Acknowledgements \u003ca name = \"acknowledgement\"\u003e\u003c/a\u003e\n- Find on Packagist: https://packagist.org/packages/antare74/response-formatter\n- References format: https://github.com/belajarkoding/laravel-response-formatter/blob/master/ResponseFormatter.php\n","funding_links":["https://github.com/sponsors/antare74"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantare74%2Fresponse-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantare74%2Fresponse-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantare74%2Fresponse-formatter/lists"}