PHPackages                             onexcrm/response-structure - 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. onexcrm/response-structure

ActiveLibrary

onexcrm/response-structure
==========================

Create useful api or service response structure easily.

v1.0.1(3y ago)014MITPHP

Since Feb 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dev-arindam-roy/onex-response-structure)[ Packagist](https://packagist.org/packages/onexcrm/response-structure)[ RSS](/packages/onexcrm-response-structure/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

ONEXCRM Create Response Structure
=================================

[](#onexcrm-create-response-structure)

Create response structure for API call or Service call - easily.
----------------------------------------------------------------

[](#create-response-structure-for-api-call-or-service-call---easily)

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

[](#installation)

```
composer require onexcrm/response-structure
```

### Laravel without auto-discovery:

[](#laravel-without-auto-discovery)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
Onex\Responsestructure\OnexResponseStructureServiceProvider::class,
```

If you want to use the facade to log messages, add this to your facades in app.php:

```
'OnexResponse'=> Onex\Responsestructure\Responsestructure\ResponseStructureClassFacade::class,
```

### How to use?:

[](#how-to-use)

```
/**
 * 1st @param  array $dataBag
 * 2nd @param  string $responseMessage (default = '')
 * 3rd @param  string $bodyMessageTitle (default = '')
 * 4th @param  string $bodyMessage (default = '')
 * 5th @param  string $messageType (default = 'success')
 * 6th @param  string $responseStatus (default = '200')
 * 7th @param  string $responseType (default = 'success')
 * 8th @param  string $httpCode (default = '200')
*/
```

> Example #1 (Array Format)

---

```
$getResponse = OnexResponse::constructResponse($userData, 'User list found');
dd($getResponse);
```

> Example #2 (Json Format)

---

```
$getResponse = OnexResponse::constructResponseJson($userData, 'User list found');
dd($getResponse);
```

> Example #3 (Json Object Response Format)

---

```
$getResponse = OnexResponse::constructResponseJsonObject($userData, 'User list found');
dd($getResponse);
```

> Sample Response

---

[![onex_resstruc](https://user-images.githubusercontent.com/24665327/220434253-7ef23c52-3715-4454-ad6a-b66d4ed3f317.png)](https://user-images.githubusercontent.com/24665327/220434253-7ef23c52-3715-4454-ad6a-b66d4ed3f317.png)

Feel free to contact me: Arindam Roy

### Thanks

[](#thanks)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

1177d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffd181826d9f6d75df74a8a134488bb2820aa58aa9f99fad3ef6de7af7d8393e?d=identicon)[devarindam](/maintainers/devarindam)

---

Top Contributors

[![dev-arindam-roy](https://avatars.githubusercontent.com/u/24665327?v=4)](https://github.com/dev-arindam-roy "dev-arindam-roy (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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