PHPackages                             unk-fy/laravel-api-response - 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. unk-fy/laravel-api-response

ActiveLibrary[API Development](/categories/api)

unk-fy/laravel-api-response
===========================

Laravel API Response helpers for standardized API responses

1.0.1(6mo ago)035MITPHPPHP ^8.1

Since Nov 5Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Amanar-Marouane/laravel-api-response)[ Packagist](https://packagist.org/packages/unk-fy/laravel-api-response)[ RSS](/packages/unk-fy-laravel-api-response/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

🚧 Next Version Roadmap
----------------------

[](#-next-version-roadmap)

The upcoming version of this package will include several improvements to enhance developer experience and API consistency:

- ✅ **Auto-detect Laravel API Resources or Collections** and wrap them automatically in success responses.
- ✅ **Debug mode support** (toggled via `.env`) to include exception trace info in error responses (local/dev environments only).
- ✅ **Laravel localization integration** using `__()` helper for translatable response messages.
- ✅ **Predefined constants or enums** for HTTP status codes, e.g., `self::NOT_FOUND`, `self::CREATED`, for cleaner syntax.
- ✅ **Static testing helpers** like `HttpResponse::mockSuccess()` and `mockError()` for writing cleaner API tests.
- ✅ **Macro support** to enable `response()->success($data)` and `response()->error($message)` via Laravel service provider.
- ✅ **Response-wrapping middleware** that auto-converts all controller return data into standardized API formats (unless opted out).
- ✅ **Optional JSON:API compatible output mode**, supporting `{ data: ..., errors: ..., meta: ... }` structure for advanced clients.

> feedback, and ideas are welcome **NB:** This package is primarily built for **my personal use**.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance68

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

186d ago

PHP version history (2 changes)1.0.0PHP ^7.3|^8.0

1.0.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/576bac7d4d5597c102aeff137a2d2f7de6258e1cc7df038ee4a433bd02f518e5?d=identicon)[Amanar-Marouane](/maintainers/Amanar-Marouane)

---

Top Contributors

[![Amanar-Marouane](https://avatars.githubusercontent.com/u/155680356?v=4)](https://github.com/Amanar-Marouane "Amanar-Marouane (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/unk-fy-laravel-api-response/health.svg)

```
[![Health](https://phpackages.com/badges/unk-fy-laravel-api-response/health.svg)](https://phpackages.com/packages/unk-fy-laravel-api-response)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
