PHPackages                             dipenparmar12/responder - 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. dipenparmar12/responder

ActiveLibrary

dipenparmar12/responder
=======================

A Laravel package for custom api response payload

1.0.0(5y ago)513MITPHPPHP ^7.1

Since Jul 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/dipenparmar12/responder)[ Packagist](https://packagist.org/packages/dipenparmar12/responder)[ RSS](/packages/dipenparmar12-responder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Extend Json response method in laravel
======================================

[](#extend-json-response-method-in-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6788f95d623bad417e8e8b315be09d913b28c9b15009f5fe2cad16595671d4d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646970656e7061726d617231322f526573706f6e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dipenparmar12/Responder)[![Total Downloads](https://camo.githubusercontent.com/45bd6d86cb89c58cf044965f857a8e6ee50146938048fb3e439908e09712ac74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646970656e7061726d617231322f526573706f6e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dipenparmar12/Responder)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require dipenparmar12/responder
```

Usage
-----

[](#usage)

Syntax for success response

> `response()->success( $message [, $data = null, $subStatus = 200, $finalStatus = 200])`

Syntax for error response

> `return response()->error( $message [, $data = null, $subStatus = 400, $finalStatus = 200])`

Example

> `return response()->success( 'data inserted', $data, 200, 200)`

```
[
    'success' => true,
    'message' => "data inserted",
    'status' => 200,
    'path' => '/uri-segment',
    'results' => $your_data,
    'metadata' => [
        'auth_id' => 'loged_in_user_id or null',
        'url' => 'url'
    ]
]
```

> `return response()->error( 'error occured', request()->all(), 401, 500)`

```
[
    'success' => false,
    'message' => "error occured",
    'status' => 401,
    'path' => '/uri-segment',
    'results' => $your_data,
    'metadata' => [
        'auth_id' => 'loged_in_user_id or null',
        'url' => 'url'
    ]
]
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Dipen Parmar](https://github.com/dipenparmar12)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

2138d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5939d00c718c6059dcf6b6c6db63bc532a9eaaea4feb1b7e2d804a2c5075978c?d=identicon)[dipenparmar12](/maintainers/dipenparmar12)

---

Top Contributors

[![dipenparmar12](https://avatars.githubusercontent.com/u/22059959?v=4)](https://github.com/dipenparmar12 "dipenparmar12 (7 commits)")

### Embed Badge

![Health badge](/badges/dipenparmar12-responder/health.svg)

```
[![Health](https://phpackages.com/badges/dipenparmar12-responder/health.svg)](https://phpackages.com/packages/dipenparmar12-responder)
```

PHPackages © 2026

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