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 1mo 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 83% 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

2267d 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

[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)
