PHPackages                             litermi/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. [Database &amp; ORM](/categories/database)
4. /
5. litermi/response

ActiveLibrary[Database &amp; ORM](/categories/database)

litermi/response
================

The Response is a package to response api-rest .

1.0.21(1y ago)03.6k1MITPHPPHP ^7.4|^8.0

Since Apr 7Pushed 1y agoCompare

[ Source](https://github.com/litermi/response)[ Packagist](https://packagist.org/packages/litermi/response)[ RSS](/packages/litermi-response/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (23)Used By (1)

Response
========

[](#response)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

About
-----

[](#about)

The `Response` is a package to response api-rest .

##### [Tutorial how create composer package](https://cirelramos.blogspot.com/2022/04/how-create-composer-package.html)

[](#tutorial-how-create-composer-package)

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

[](#installation)

Require the `litermi/response` package in your `composer.json` and update your dependencies:

```
composer require litermi/response
```

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

[](#configuration)

set provider

```
'providers' => [
    // ...
    Litermi\Response\Providers\ServiceProvider::class,
],
```

The defaults are set in `config/response.php`. Publish the config to copy the file to your own config:

```
php artisan vendor:publish --provider="Litermi\Response\Providers\ServiceProvider"
```

> **Note:** this is necessary to you can change default config

Usage
-----

[](#usage)

```
use Litermi\Response\Traits\ResponseTrait;

class Controller extends BaseController
{
    use ResponseTrait;
    //.
    //.
    //.
}
```

```
Class ProductController extends Controller
{
    //.
    //.
    //.

    public function store(ProductRequest $request){

        $successMessage = _('OPERATION_SUCCESSFUL_MESSAGE');
        $errorMessage   = _('AN_ERROR_HAS_OCCURRED_MESSAGE');

        try {
            DB::beginTransaction();

            $product = new Product();
            $product->fill($request->validated());
            $product->save();
            DB::commit();

            $data[ 'product' ] = new ProductResource($product);

            return $this->successResponseWithMessage($data, $successMessage, Response::HTTP_CREATED);

        }
        catch(Exception $exception) {
            DB::rollBack();

            return $this->errorCatchResponse($exception, $errorMessage, Response::HTTP_SERVICE_UNAVAILABLE);
        }
    }

    //.
    //.
    //.
}
```

License
-------

[](#license)

Released under the MIT License, see [LICENSE](LICENSE).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% 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 ~39 days

Recently: every ~30 days

Total

21

Last Release

710d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/73536c3820a8a906ec83b9a56ebff32aa6ef4529c66efb6a33b42fde1dfb55f2?d=identicon)[litermi](/maintainers/litermi)

---

Top Contributors

[![cirelramoslitermi](https://avatars.githubusercontent.com/u/142442403?v=4)](https://github.com/cirelramoslitermi "cirelramoslitermi (21 commits)")[![cirelramos](https://avatars.githubusercontent.com/u/11335197?v=4)](https://github.com/cirelramos "cirelramos (1 commits)")

---

Tags

loglaraveldatabase

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)

PHPackages © 2026

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