PHPackages                             fabianomendesdev/laravel-json-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. fabianomendesdev/laravel-json-response

ActiveLibrary

fabianomendesdev/laravel-json-response
======================================

Custom Response Structure for a Laravel API

v1.2.0(9mo ago)1696↑1809.1%MITPHPPHP ^8.0

Since Aug 31Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/fabianomendesdev/laravel-json-response)[ Packagist](https://packagist.org/packages/fabianomendesdev/laravel-json-response)[ RSS](/packages/fabianomendesdev-laravel-json-response/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (12)Used By (0)

laravel-json-response
=====================

[](#laravel-json-response)

```
composer require fabianomendesdev/laravel-json-response
```

```
use Fabianomendesdev\LaravelJsonResponse\Api;
```

```
return Api::personalizedResponse(200, [
  'message'  => "Sucesso!",
  'response' => new UserResource($user)
]);
```

```
$validator = Validator::make($request->all(), [
  'nome' => 'required|string|max:100'
]);

if ( $validator->fails() ) {
  return Api::personalizedResponse(300, [
    'message' => Api::errorFeedbackMessage($validator),
    'errors'  => $validator->errors()->messages()
  ]);
}

return Api::successMessage("Success!");
```

```
$validator = Validator::make($request->all(), [
  'nome' => 'required|string|max:100'
]);

if ($validator->fails()) return Api::returnErrorFields($validator);

return Api::message("Success!", 200);
```

```
try {
    if (100 > 200) {
        throw new Exception("Error");
    }
} catch (Exception $e) {
    return Api::systemStandardError(Throwable $e);
}
```

### Exception in Laravel "Exceptions/Handler.php"

[](#exception-in-laravel-exceptionshandlerphp)

```
public function register(): void
{
    $this->renderable(function (NotFoundHttpException $notFoundHttpException) {
        return Api::standardErrorNotFound($notFoundHttpException);
    f});

    $this->renderable(function (MethodNotAllowedHttpException $methodNotAllowedHttpException) {
        return Api::errorMessage($methodNotAllowedHttpException, "Método não suportado para a rota atual.", 405);
    });

    $this->renderable(function (Throwable $exception) {
        return Api::exception($exception);
    });
}
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance58

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~78 days

Total

10

Last Release

278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e66da3cffda7fd26ccc6dfabbbc3f407e84eb0b089a37b55ab419d6f96aa84f?d=identicon)[fabianomendesdev](/maintainers/fabianomendesdev)

---

Top Contributors

[![fabianomendesdev](https://avatars.githubusercontent.com/u/67290805?v=4)](https://github.com/fabianomendesdev "fabianomendesdev (26 commits)")

### Embed Badge

![Health badge](/badges/fabianomendesdev-laravel-json-response/health.svg)

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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