PHPackages                             firebit/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. firebit/laravel-api-response

ActiveLibrary[API Development](/categories/api)

firebit/laravel-api-response
============================

Simple Laravel package for creating API responses, compliant with JSend and the HTTP standard.

0.1.2.2(5y ago)31971[1 issues](https://github.com/firebit/laravel-api-response/issues)MITPHPPHP &gt;=7

Since Oct 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/firebit/laravel-api-response)[ Packagist](https://packagist.org/packages/firebit/laravel-api-response)[ Docs](https://firebit.nl)[ RSS](/packages/firebit-laravel-api-response/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

[ ![Firebit logo](https://avatars2.githubusercontent.com/u/49287371?s=200&v=4](https://avatars2.githubusercontent.com/u/49287371?s=200&v=4))](http://firebit.nl/)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 firebit/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

25

—

LowBetter than 36% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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 ~96 days

Total

5

Last Release

2069d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49287371?v=4)[Firebit](/maintainers/firebit)[@firebit](https://github.com/firebit)

---

Top Contributors

[![JordyAlkema](https://avatars.githubusercontent.com/u/8687344?v=4)](https://github.com/JordyAlkema "JordyAlkema (10 commits)")

---

Tags

api-resthttp-status-codejsendlaravellaravel-package

### Embed Badge

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

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[resend/resend-laravel

Resend for Laravel

1212.2M8](/packages/resend-resend-laravel)[essa/api-tool-kit

set of tools to build an api with laravel

53386.5k](/packages/essa-api-tool-kit)[flat3/lodata

OData v4.01 Producer for Laravel

99346.1k](/packages/flat3-lodata)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3175.9k](/packages/joggapp-laravel-aws-sns)

PHPackages © 2026

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