PHPackages                             neography7/easy-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. neography7/easy-response

ActiveLibrary[API Development](/categories/api)

neography7/easy-response
========================

Standardized response for REST APIs with easy usability.

1.0.0(3y ago)132MITPHPPHP ^8.1

Since Jun 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Neography7/Laravel-EasyResponse)[ Packagist](https://packagist.org/packages/neography7/easy-response)[ Docs](https://github.com/neography7/easy-response)[ RSS](/packages/neography7-easy-response/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Introduction
============

[](#introduction)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3d468d91c7d8289ec3d0f45cea4a36291962bfb5bf8cf2b2ad1cbde12514ba76/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e656f677261706879372f656173792d726573706f6e73652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/neography7/easy-response)[![Total Downloads](https://camo.githubusercontent.com/f5750606125175cb4599c33920fe27ec98633a99c115a18a1bc17368ca2763de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e656f677261706879372f656173792d726573706f6e73652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/neography7/easy-response)[![GitHub Actions](https://github.com/neography7/easy-response/actions/workflows/main.yml/badge.svg)](https://github.com/neography7/easy-response/actions/workflows/main.yml/badge.svg)

Easy Response allows you to create REST Callbacks in an easy way. This package has 3 ways to create callbacks which you can use what you want. But if it's suitable for you, the helpers will be more easy and clean.

This package follows PSR-2 and PSR-4 standards.

Installation
============

[](#installation)

You can install the package via composer:

```
composer require neography7/easy-response
```

Usage
=====

[](#usage)

There are three ways to use this package but using it with the helpers is recommended.

1) Helpers
----------

[](#1-helpers)

### easySuccess helper

[](#easysuccess-helper)

```
easySuccess( message, title = null, data = null);
```

```
easySuccess(
    message: 'Test message',
    title: 'Test Title',
    data: [
        "key" => "value"
    ]
);
```

or like this

```
easySuccess('Test message', 'Test Title', [ "key" => "value" ]);
```

### easyError helper

[](#easyerror-helper)

```
easyError( message, title = null, code = null, data = null);
```

```
easyError(
    message: 'Test message',
    title: 'Test Title',
    code: 400,
    data: [
        "key" => "value"
    ]
);
```

or like this

```
easyError('Test message', 'Test Title', 400, [ "key" => "value" ]);
```

2) Class
--------

[](#2-class)

Firstly import the class, then create an instance.

```
use Neography7\EasyResponse\EasyResponse;

$callback = new EasyResponse;

```

You can add message, title, success, code, data or add custom key with chaining methods.

```
$callback->title("Title")
            ->message("Message")
            ->success("true")
            ->response();

```

The response method is going to make it all together into an array then it responds as a json callback. If success is given as true, the response code will be 200. Additionally, you can add data, code, and custom key-value with the chaining methods.

```
$callback->title("Error Title")
            ->message("Error message.")
            ->success("false")
            ->code(404)
            ->data["key" => value]
            ->addKey("key", value)
            ->response();

```

If you want to remove the key that you added, you can use this method.

```
$callback->removeKey("key");

```

3) Static Class
---------------

[](#3-static-class)

Firstly import the class that initializes EasyResponse, then call the success or error method that you want to use.

```
use Neography7\EasyResponse\EA;

$callbackSuccess = EA::success($message, $title = null);
$callbackError = EA::error($message, $title = null, $code = null);

```

You must to call response method after use.

```
$callback EA::success("Message", "Title")->response();

```

Testing
=======

[](#testing)

I recommend testbench with "nunomaduro/collision" for testing.

```
php vendor/bin/testbench package:test
```

Roadmap
=======

[](#roadmap)

- The package were created
- More helpers function will be added
- Initial callbacks messages and their translations will be added

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)

- [İlker Akyel](https://github.com/neography7)
- [All Contributors](../../contributors)

License
=======

[](#license)

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

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

1099d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e70a6406bf7987d237e04e642ea29cc1717d7c04a40fadf33f434c26354b2ce?d=identicon)[neography](/maintainers/neography)

---

Top Contributors

[![Neography7](https://avatars.githubusercontent.com/u/97966652?v=4)](https://github.com/Neography7 "Neography7 (3 commits)")

---

Tags

laravellaravel10phpphp8neography7easy-response

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/neography7-easy-response/health.svg)

```
[![Health](https://phpackages.com/badges/neography7-easy-response/health.svg)](https://phpackages.com/packages/neography7-easy-response)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rapidez/core

Rapidez Core

1823.5k72](/packages/rapidez-core)

PHPackages © 2026

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