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)133MITPHP

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 2d 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

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

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

802d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/473559?v=4)[Yusha Y.](/maintainers/yusha)[@yusha](https://github.com/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

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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