PHPackages                             dwolf555/api-docs-controller - 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. dwolf555/api-docs-controller

ActiveLibrary

dwolf555/api-docs-controller
============================

v1.1(12y ago)120MITPHPPHP &gt;=5.4.0

Since Jan 10Pushed 12y agoCompare

[ Source](https://github.com/dwolf555/ApiDocsController)[ Packagist](https://packagist.org/packages/dwolf555/api-docs-controller)[ Docs](https://github.com/dwolf555/ApiDocsController.git)[ RSS](/packages/dwolf555-api-docs-controller/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

ApiDocsController
=================

[](#apidocscontroller)

Laravel controller class that allows for output of API docs if the "accept" header is not set to json.

### Set up

[](#set-up)

Add the following to your composer.json and composer update / composer install

```
{
    "require": {
        "dwolf555/api-docs-controller": "dev-master"
    }
}
```

Add the following to your app/config/app.php providers array

```
'Dwolf555\ApiDocsController\ApiDocsControllerServiceProvider',
```

### Example Controller

[](#example-controller)

```
class UserController extends Dwolf555\ApiDocsController\ApiDocsController {

    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        // For documentation
        $this->apiDocInfo = [
            'wordOfWarning' => 'Just be ok, ok?',
            'exampleResponse' => ['message' => 'ok'],
            'inputs' => [
                'limit' => 10,
                'offset' => 0
            ],
            'possibleErrors' => [
                'limit' => 'Limit must be a valid integer.',
                'offset' => 'Limit must be a valid integer.',
            ]
        ];

        $content = array(
            'actualcontent' => 'realstuff'
        );
        $statusCode = 200;

        return $this->generateResponse($content, $statusCode);
    }

}
```

### Example Output

[](#example-output)

[![Example Output](https://camo.githubusercontent.com/552b0a9db2487cc7bc855c857d801cbf08bd0e99b4f90b0877365c2b6c2d2341/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6d656574617065742f736974655f66696c65732f73616d706c652d6f75747075742e706e67)](https://camo.githubusercontent.com/552b0a9db2487cc7bc855c857d801cbf08bd0e99b4f90b0877365c2b6c2d2341/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6d656574617065742f736974655f66696c65732f73616d706c652d6f75747075742e706e67)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

4510d ago

### Community

Maintainers

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

---

Top Contributors

[![dwolfhub](https://avatars.githubusercontent.com/u/3383733?v=4)](https://github.com/dwolfhub "dwolfhub (11 commits)")

### Embed Badge

![Health badge](/badges/dwolf555-api-docs-controller/health.svg)

```
[![Health](https://phpackages.com/badges/dwolf555-api-docs-controller/health.svg)](https://phpackages.com/packages/dwolf555-api-docs-controller)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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