PHPackages                             cerenimo/response-messages - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cerenimo/response-messages

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cerenimo/response-messages
==========================

11.0k1PHP

Since Jul 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cerenozkurt/response-package)[ Packagist](https://packagist.org/packages/cerenimo/response-messages)[ RSS](/packages/cerenimo-response-messages/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Response Messages
=================

[](#response-messages)

```
composer require cerenimo/response-messages "dev-main"
```

The ResponseTrait is a trait used to standardize the HTTP response messages in Laravel and Lumen. You can install it using the composer command mentioned above. To use it in your class, add the following line with the "use" keyword:

```
use CerenOzkurt\ResponseMessages\ResponseTrait;

class YourClass {

use ResponseTrait;
// ...
}
```

Inside your function, you can use it as follows:

```
return $this->responseData(['message' => $message]);
```

Response / 200 OK

```
{
    "result": true,
    "data": {
        "message": {
            "id": 372,
            "role": "user",
            "message": "Hi",
            "end_conversation": 0,
            "created_time": "2023-05-30T09:28:01.000000Z",
            "conversation_completion_count": "0.60",
            "word_count": 1
        }
    }
}
```

---

The package provides the following functions:
- **responseData($data, $message = null)** : *Use if the request is successful and data is wanted to be returned.*
- **responseSuccess($message = null)** : *Use if the request is successful.*
- **responseError($message = null, $status = 500)** : *Use if the request is error.*
- **responseValidation($validation)** : *Use if there is a validation error.*
- **responseDataNotFound($data\_name = null)** : *Use if not found error.*
- **responseForbidden($message = null)** : *Use in forbidden error.*
- **responseUnauthorized($message = null)** : *Use in unauthorized error.*
- **responseTryCatch($message = null, $status = 500)** : *Use in try-catch error.*
- **responseDataCount($data)** : *Use if the data need count information.*
- **responseBadRequest($message = null)** : *Use if the sent request is incorrect.*
- **responseConflict($message = null)** : *Use if a mismatch occurs due to a predetermined rule or version differences on the web server of your request.*
- **responsePayloadTooLarge($message = null)** : *Use if the request entity is much larger than the limits defined by the server.*
- **responseTooManyRequests($message = null)** : *Use if the website exceeded the specified request limit.*
- **responseInternalServer($message = null)** : *Use if a server-side error occurred.*
- **responseNotImplemented($message = null)** : *Use if the server does not support the features required to fulfill the request.*

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/533c17d66ddb91387d405b60a71ef5e3dd5d8a274b43b7d7bcd4bd65fc152ddb?d=identicon)[cerenozkurt](/maintainers/cerenozkurt)

---

Top Contributors

[![cerenozkurt](https://avatars.githubusercontent.com/u/33186246?v=4)](https://github.com/cerenozkurt "cerenozkurt (20 commits)")

### Embed Badge

![Health badge](/badges/cerenimo-response-messages/health.svg)

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

PHPackages © 2026

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