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 today

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

24

—

LowBetter than 32% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

2018d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f964b72a4838bfa52c76b938ac7db887745d30a725f830f64271559ef355c133?d=identicon)[firebit](/maintainers/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

[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

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

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[spatie/spatie-price-api

The Price API used at promotional sites for our own products

1515.1k1](/packages/spatie-spatie-price-api)

PHPackages © 2026

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