PHPackages                             hardcodear/api-response-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. hardcodear/api-response-service

ActiveLibrary[API Development](/categories/api)

hardcodear/api-response-service
===============================

Servicio para formatear respuestas JSON en Laravel

v1.2.0(5d ago)118↓100%MITPHPPHP ^8.2CI passing

Since Mar 12Pushed 5d ago1 watchersCompare

[ Source](https://github.com/hardcodear/api-response-service)[ Packagist](https://packagist.org/packages/hardcodear/api-response-service)[ Docs](https://github.com/hardcodear/api-response-service)[ RSS](/packages/hardcodear-api-response-service/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

Api Response Service
====================

[](#api-response-service)

[![Version](https://camo.githubusercontent.com/48eacfdf12eeb52bcd547b4615e2275e49793877a6cabddbbfddcfe9adf9fa21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68617264636f646561722f6170692d726573706f6e73652d73657276696365)](https://packagist.org/packages/hardcodear/api-response-service)[![Downloads](https://camo.githubusercontent.com/564ed0da9b9625ac7471bbabc5cf2c20453493896c25359b3278ce2d90f1b118/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68617264636f646561722f6170692d726573706f6e73652d73657276696365)](https://packagist.org/packages/hardcodear/api-response-service)[![PHP Version](https://camo.githubusercontent.com/8aabdc861c7688f59041a78ca66bbbce91cae3e54616ea2f5434bf9a54154261/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f68617264636f646561722f6170692d726573706f6e73652d73657276696365)](https://packagist.org/packages/hardcodear/api-response-service)[![License](https://camo.githubusercontent.com/eeb6a17fb2bd1f25b68dac317891b5c5a8218b60b393c7740a0be30abdf6e9f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68617264636f646561722f6170692d726573706f6e73652d73657276696365)](https://packagist.org/packages/hardcodear/api-response-service)[![CI](https://github.com/hardcodear/api-response-service/actions/workflows/tests.yml/badge.svg)](https://github.com/hardcodear/api-response-service/actions/workflows/tests.yml)

**Paquete Laravel 12+ (incluye Laravel 13) para formatear respuestas JSON de forma estandarizada.**

Este paquete proporciona una forma consistente de estructurar las respuestas JSON para APIs Laravel, siguiendo un formato uniforme para respuestas exitosas y de error.

---

✅ Compatibilidad
----------------

[](#-compatibilidad)

- PHP `8.2+`
- Laravel `12+` (incluye `13`)

---

📦 Instalación
-------------

[](#-instalación)

### Instalar el paquete

[](#instalar-el-paquete)

En consola:

```
composer require hardcodear/api-response-service
```

Laravel detectará automáticamente el `ServiceProvider` y registrará el alias del facade `apiresponse` gracias al archivo `composer.json` del paquete.

---

⚡ Quick Start
-------------

[](#-quick-start)

```
