PHPackages                             yusha/api-responser - 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. yusha/api-responser

ActiveLibrary[API Development](/categories/api)

yusha/api-responser
===================

Laravel API Responser simplifies API response handling in Laravel. Format, manipulate, and customize your responses effortlessly, reducing repetitive code and improving response consistency

v1.0.3(2y ago)127MITPHP

Since Apr 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yushabadri/api-responser)[ Packagist](https://packagist.org/packages/yusha/api-responser)[ RSS](/packages/yusha-api-responser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (6)Used By (0)

API Response Handler
====================

[](#api-response-handler)

Your package description goes here.

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

[](#installation)

You can install this package via Composer. Run the following command in your terminal:

```
composer require yusha/api-responser
```

Usage
-----

[](#usage)

### Using the handle Method

[](#using-the-handle-method)

To use the `Responser` in your controllers or other classes, simply call the `handle` method:

```
use Yusha\ApiResponder\Services\Responser;

class SomeController extends Controller
{
    public function someMethod()
    {
        return Responser::handle(Response::HTTP_OK, $data, 'Data successfully returned.');
    }
}
```

### handle Method Parameters

[](#handle-method-parameters)

The handle method accepts three parameters:

- Status Code: This is the HTTP status code that will be returned in the response. It indicates the status of the request. For example, Response::HTTP\_OK represents a successful response (status code 200).
- Data: This parameter is optional and represents any additional data that you want to include in the response. It can be an array, object, or any other data structure that you want to return along with the response.
- Message: This is an optional parameter that allows you to include a message in the response. It can be used to provide additional information about the response, such as a success message or an error message. Here's an example of how you can use the handle method:

```
   return Responser::handle(Response::HTTP_OK, $data, 'Data successfully returned.');

```

In this example, the handle method is used to create a JSON response with a status code of 200 (OK), the $propertiesData as the data, and the message 'Properties data successfully returned.'.

### Customization

[](#customization)

You can customize the behavior of the `Responser` by extending it and overriding its methods in your own class.

Configuration
-------------

[](#configuration)

This package does not require any additional configuration.

Testing
-------

[](#testing)

You can run the package's tests using PHPUnit. Run the following command in your terminal:

```
composer test
```

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

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

4

Last Release

754d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3f7b4b9d321ffc564d18b799ed26039adebfdf1bdad0b1b1df8a8410eda05fb?d=identicon)[yusha](/maintainers/yusha)

---

Top Contributors

[![yushabadri](https://avatars.githubusercontent.com/u/91459205?v=4)](https://github.com/yushabadri "yushabadri (11 commits)")

---

Tags

laravelpackagephp

### Embed Badge

![Health badge](/badges/yusha-api-responser/health.svg)

```
[![Health](https://phpackages.com/badges/yusha-api-responser/health.svg)](https://phpackages.com/packages/yusha-api-responser)
```

###  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)
