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

ActivePackage[API Development](/categories/api)

pyskunov/laravel-api-response
=============================

JsonResponse Mixins

1.0.1(5y ago)09MITPHPPHP ^7.3|^8.0

Since Mar 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/pyskunov/laravel-api-response)[ Packagist](https://packagist.org/packages/pyskunov/laravel-api-response)[ RSS](/packages/pyskunov-laravel-api-response/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

General
=======

[](#general)

This package allows creating json responses in easy way.

In order to shorthand JsonResponse creation you can use:

JsonResponse::success // return JsonResponse JsonResponse::noContent // return JsonResponse, 204 status JsonResponse::publicError // throws PublicException JsonResponse::privateError // throws PublicException JsonResponse::error // return JsonResponse, not using Handler.php of laravel, just returning JSON.

JsonResponseMixin
-----------------

[](#jsonresponsemixin)

JsonResponse functionality extended with class JsonResponseMixin.

Exceptions
----------

[](#exceptions)

- VisibilityException - parent of PublicException &amp; PrivateException
- PublicException - can obtain printable $data property + has message
- PrivateException - cannot obtain printable $data property, has only message

How to
------

[](#how-to)

### Extend Status Codes

[](#extend-status-codes)

- create a new class and extend StatusCodes.php
- add your own codes or override existing codes
- use your own class while throwing errors

### Extend Mixins

[](#extend-mixins)

- publish vendor
- create a new class
- write your macroses inside a new class
- use your class in config file laravel-api-response that was recently published

### TODO

[](#todo)

- Add more Status Codes
- Add prettier Docs
- Cover with basic tests

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

1847d ago

PHP version history (2 changes)1.0.0PHP ^7.3

1.0.1PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c03853f97a5a9c5c682d062f9eb6a473e08c244f3a592f89972b9e169afdb52?d=identicon)[pyskunov](/maintainers/pyskunov)

---

Top Contributors

[![pyskunov](https://avatars.githubusercontent.com/u/80057979?v=4)](https://github.com/pyskunov "pyskunov (5 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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