PHPackages                             ftxrc/apicontroller - 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. ftxrc/apicontroller

ActiveLibrary[API Development](/categories/api)

ftxrc/apicontroller
===================

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+. Forked from eventhomes

0.1.8(10y ago)237MITPHPPHP &gt;=5.5.9

Since Jun 19Pushed 9y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (11)Used By (0)

Laravel 5 / Lumen 5 Api Controller
==================================

[](#laravel-5--lumen-5-api-controller)

Fork of EventHomes' APIController trait. Has a few fixes and customizations that make it more useful, like prettyprinting and raw responses.
--------------------------------------------------------------------------------------------------------------------------------------------

[](#fork-of-eventhomes-apicontroller-trait-has-a-few-fixes-and-customizations-that-make-it-more-useful-like-prettyprinting-and-raw-responses)

A simple api controller helper trait, compatible with Lumen 5+ and Laravel 5+. The goal of this project is to make creating API projects simple. Inspired by Jeffrey Way ()

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

[](#installation)

`composer require eventhomes/laravel-apicontroller`

Basic Setup/Usage
-----------------

[](#basic-setupusage)

```
...
use EventHomes\Api\ApiController;

class MyController extends Controller {

    use ApiController;

    public function index() {
        return $this->respond(['status' => 'hello world']);
    }

}
```

Api Helper functions
--------------------

[](#api-helper-functions)

Please browse through the source to see a full list.

```
//200 response
$this->respond();

//201 response
$this->respondCreated();

//500 error
$this->respondServerError();

//422 error
$this->respondUnprocessable();

//General error
$this->respondWithError('message here');
```

Add Fractal Helpers
-------------------

[](#add-fractal-helpers)

Please use \[\]

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.1% 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 ~0 days

Total

9

Last Release

3974d ago

### Community

Maintainers

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

---

Top Contributors

[![lostincode](https://avatars.githubusercontent.com/u/565885?v=4)](https://github.com/lostincode "lostincode (35 commits)")[![matteing](https://avatars.githubusercontent.com/u/7959397?v=4)](https://github.com/matteing "matteing (3 commits)")

---

Tags

apilaravellumenfractalapi controller

### Embed Badge

![Health badge](/badges/ftxrc-apicontroller/health.svg)

```
[![Health](https://phpackages.com/badges/ftxrc-apicontroller/health.svg)](https://phpackages.com/packages/ftxrc-apicontroller)
```

###  Alternatives

[spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

1.9k15.1M99](/packages/spatie-laravel-fractal)[flugger/laravel-responder

A Laravel Fractal package for building API responses, giving you the power of Fractal and the elegancy of Laravel.

8901.5M5](/packages/flugger-laravel-responder)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[dragon-code/laravel-json-response

Automatically always return a response in JSON format

1118.6k1](/packages/dragon-code-laravel-json-response)

PHPackages © 2026

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