PHPackages                             hamid-re3a/response-transformer - 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. hamid-re3a/response-transformer

ActiveLibrary

hamid-re3a/response-transformer
===============================

Simple transfomer to return Json responses.

12.4k↓100%PHP

Since Dec 31Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction:
=============

[](#introduction)

The main purpose of this package is to return the response in the desired way as the frontend development team requested.

Setup:
======

[](#setup)

This is a private package. So, the installation process is completely different. For this purpose, we recorded 2 videos which you can watch to learn how to install this package.

1. Installation
    - Video 01: [https://drive.google.com/file/d/1Bic6tk3b5cjQp3rQM3DS\_Nj94O2qb77V/view](https://drive.google.com/file/d/1Bic6tk3b5cjQp3rQM3DS_Nj94O2qb77V/view)
    - Video 02: [https://drive.google.com/file/d/1yOJwaOvs9MKukk-Hh1NA\_DG2ZITM8zBr/view](https://drive.google.com/file/d/1yOJwaOvs9MKukk-Hh1NA_DG2ZITM8zBr/view)
    - Auth URL:
    - Private Package Setup Guide:
2. After installation, register the package service provider in `app.php` file like other packages.
    - `\ResponseTransformerServiceProvider::class`
3. Register the package façade alias in `app.php` file:
    - `'RTransformer' => ResponseTransformer\Facades\API::class`
4. Finally you can publish the config file:
    - `php artisan vendor:publish --tag=transformer-response`

Usage:
======

[](#usage)

You can using this package as façade as well as a helper function.

**01. Helper Function:**

```
public function index()
{
    $user = User::first();
    return api()->response(200, 'The very first user in the database', $user);
}

```

**02. Facade:**

```
use RTransformer;
public function index()
{
    $user = User::first();
    return RTransformer->response(200, 'The very first user in the database', $user);
}

```

**Response**

```
{
      "status": 200,
      "message": "The very first user in the database",
      "data": [
           {"name": "Hamid Noruzi"}
       ]
}

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.9% 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/b13661368b04d4c7238eb24ab05c882826b4a6aa97d4e4e9cd8777dd68cb6dca?d=identicon)[hamid-re3a](/maintainers/hamid-re3a)

---

Top Contributors

[![ridetothefuture](https://avatars.githubusercontent.com/u/84563812?v=4)](https://github.com/ridetothefuture "ridetothefuture (8 commits)")[![hamid-re3a](https://avatars.githubusercontent.com/u/34544154?v=4)](https://github.com/hamid-re3a "hamid-re3a (1 commits)")

### Embed Badge

![Health badge](/badges/hamid-re3a-response-transformer/health.svg)

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

PHPackages © 2026

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