PHPackages                             esdlabs/reply - 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. esdlabs/reply

ActiveLibrary[API Development](/categories/api)

esdlabs/reply
=============

Manage your RESTful errors easier than ever

v1.0.4(11y ago)3127PHPPHP &gt;=5.3.0

Since Jun 4Pushed 11y ago4 watchersCompare

[ Source](https://github.com/esdlabs/reply)[ Packagist](https://packagist.org/packages/esdlabs/reply)[ RSS](/packages/esdlabs-reply/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

esdlabs/reply
=============

[](#esdlabsreply)

Package that makes RESTful error handling easier than ever.

Features
--------

[](#features)

- Pre-defined errors and response codes
- Run time errors response
- Errors defined at database

Version
-------

[](#version)

1.0.4

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

[](#installation)

**Preparation**

Open your composer.json file and add the following to the require array:

```
"esdlabs/reply": "1.*"
```

**Install dependencies**

```
php composer install
```

Or

```
php composer update
```

Integration
-----------

[](#integration)

After installing the package, open your Laravel config file app/config/app.php and add the following lines.

In the $providers array add the following service provider for this package.

```
'Esdlabs\Reply\ReplyServiceProvider',
```

In the $aliases array add the following facade for this package.

```
'Reply' => 'Esdlabs\Reply\Facades\Reply',
```

**Migrations**

```
php artisan migrate --package=esdlabs/reply
```

Database definition
-------------------

[](#database-definition)

reply\_errors

- id
- error\_code
- response\_code
- description

Define your errors at the errors table as follow:

| id | error\_code | response\_code | description | |---|---|---|---|---| | 1 | '0x001' | 400 | 'Invalid username or password' | | 2 | '0x002' | 406 | ' Valitation failed |

Usage
-----

[](#usage)

```
class LoginController extends Controller {

    public function store()
    {
        try
        {
            ...
        }
        catch (CustomException $e)
        {
            return Reply::error('0x001');
        }
        catch (AnotherException $e)
        {
            return Reply::error('0x002', array('note 1', 'note 2');
        }
        catch (Exception $e)
        {
            return Reply::customError('Custom error description', 500, "Note description");
        }
    }
}
```

HTTP Output
-----------

[](#http-output)

```
HTTP/1.1 400 Bad Request

{
    "error_code": "0x001",
    "description"": "Invalid username or password"
}
```

```
HTTP/1.1 406 Not Acceptable

{
    "error_code": "0x002",
    "description"": "Valitation failed",
    "notes" : [
        "note 1",
        "note 2"
    ]
}
```

```
HTTP/1.1 500 Internal Server Error

{
    "error_code": "UNK-ERROR",
    "description"": "Custom error description",
    "notes": "Note description"
}
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

4273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5992624a8b9b9892f1c5cac6a8661205f00c1bd787343b77e0d1f128dcea3fac?d=identicon)[mookofe](/maintainers/mookofe)

---

Top Contributors

[![mookofe](https://avatars.githubusercontent.com/u/2395540?v=4)](https://github.com/mookofe "mookofe (1 commits)")

### Embed Badge

![Health badge](/badges/esdlabs-reply/health.svg)

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

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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