PHPackages                             corporateip/laravel-api-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. [API Development](/categories/api)
4. /
5. corporateip/laravel-api-response

ActiveLibrary[API Development](/categories/api)

corporateip/laravel-api-response
================================

A simple api response factory for Laravel

1.0.7(6mo ago)024MITPHPPHP ^8.1

Since Feb 13Pushed 6mo agoCompare

[ Source](https://github.com/CorporateIP/laravel-api-response)[ Packagist](https://packagist.org/packages/corporateip/laravel-api-response)[ RSS](/packages/corporateip-laravel-api-response/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)DependenciesVersions (9)Used By (0)

Laravel API Response
====================

[](#laravel-api-response)

This package aims to makes responses from the API consistent and easy to use. It is compliant with the HTTP standard and the JSend standard.

Example
-------

[](#example)

#### Code

[](#code)

```
function getUser($id){
    // Get the data we wish to return
    $user = User:find($id);

    // If the user does not exist we return an error
    if(!$user){
        return ApiResponseFactory::notFound("User does not exist");
    }

    // Return the data by using a ReponseFactory
    return ApiResponseFactory::success($user);
}
```

#### Error output

[](#error-output)

```
{
  "status":"fail",
  "message":"User does not exist"
}
```

#### Success output

[](#success-output)

```
{
  "status":"success",
  "data": {
      "id":1,
      "name":"John Doe",
      "email":"john@example.org",
      "created_at":null,
      "updated_at":null
  }
}
```

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

[](#installation)

To install you can use Composer, use the following command to install this package.
` composer require corporateip/laravel-api-response`

Documentation
-------------

[](#documentation)

Coming soon!

Progress
--------

[](#progress)

- JSend compliance
- PHPUnit tests
- Documentation

License
-------

[](#license)

For the license please check the LICENSE file, this project has the MIT license.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance66

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Every ~88 days

Recently: every ~102 days

Total

8

Last Release

200d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1ed7e3406b20216c41022ef062af07bd20e9cd69a15024662c63e15e29a2e42?d=identicon)[CorporateIP-dev](/maintainers/CorporateIP-dev)

---

Top Contributors

[![VerburgtJimmy](https://avatars.githubusercontent.com/u/47350871?v=4)](https://github.com/VerburgtJimmy "VerburgtJimmy (3 commits)")

### Embed Badge

![Health badge](/badges/corporateip-laravel-api-response/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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