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

ActiveLibrary[API Development](/categories/api)

eventhomes/laravel-apicontroller
================================

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

2.0.1(6y ago)894.2k21MITPHPPHP ^7.2

Since Jun 19Pushed 6y ago4 watchersCompare

[ Source](https://github.com/eventhomes/laravel-apicontroller)[ Packagist](https://packagist.org/packages/eventhomes/laravel-apicontroller)[ RSS](/packages/eventhomes-laravel-apicontroller/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (4)Dependencies (2)Versions (16)Used By (1)

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

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

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

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95% 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 ~132 days

Recently: every ~39 days

Total

14

Last Release

2314d ago

Major Versions

0.1.8 → v1.02019-09-27

v0.1.9 → 2.0.02019-09-30

v1.1.0 → 2.0.12020-03-03

PHP version history (2 changes)0.1.0PHP &gt;=5.5.9

v1.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/78cbbdc5243e8c50348ff5c1e4c483b97e8b231cd24bf03a114a23fc61896fc7?d=identicon)[lostincode](/maintainers/lostincode)

---

Top Contributors

[![lostincode](https://avatars.githubusercontent.com/u/565885?v=4)](https://github.com/lostincode "lostincode (38 commits)")[![introwit](https://avatars.githubusercontent.com/u/11228182?v=4)](https://github.com/introwit "introwit (2 commits)")

---

Tags

apilaravellumenfractalapi controller

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.9k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[essa/api-tool-kit

set of tools to build an api with laravel

53390.1k](/packages/essa-api-tool-kit)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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