PHPackages                             mhamlet/laravel-apidocs - 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. mhamlet/laravel-apidocs

AbandonedArchivedLibrary

mhamlet/laravel-apidocs
=======================

API Documentation generator for Laravel

5122PHP

Since May 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mhamlet/laravel-apidocs)[ Packagist](https://packagist.org/packages/mhamlet/laravel-apidocs)[ RSS](/packages/mhamlet-laravel-apidocs/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel API Documentation generator
-----------------------------------

[](#laravel-api-documentation-generator)

[![Latest Version](https://camo.githubusercontent.com/f6bb8c40bca18223bf0217e1d8959edb784df41e0b8763610c1f0f2ab81ba1bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d68616d6c65742f6c61726176656c2d617069646f63732e7376673f7374796c653d666c61742d737175617265)](https://github.com/mhamlet/laravel-apidocs/releases)[![Build Status](https://camo.githubusercontent.com/8c5be85d55afcc8a98535381bff023e1066f6951936cafcab4000e44e249cd71/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d68616d6c65742f6c61726176656c2d617069646f63732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mhamlet/laravel-apidocs)[![Quality Score](https://camo.githubusercontent.com/f061fef2884cfdc22b88ad3e281e5e4e1102dbd90089f4a19d2331df9468c424/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d68616d6c65742f6c61726176656c2d617069646f63732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mhamlet/laravel-apidocs)[![Total Downloads](https://camo.githubusercontent.com/71e8086418bc351b91aaa3384e023073962a0adfb717438b9923a9452ba6a8f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d68616d6c65742f6c61726176656c2d617069646f63732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mhamlet/laravel-apidocs)

This Laravel package provides an API Documentation generator. It's based on your Routes and Controller Method DocBlock comments.

The package requires PHP &gt;= 7.0 and Laravel 5.4.

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

[](#installation)

Add the package in your composer.json by executing the command.

```
composer require mhamlet/laravel-apidocs
```

Next, add the service provider to `config/app.php`

```
MHamlet\Apidocs\ApidocsServiceProvider::class,
```

Documentation
-------------

[](#documentation)

```
// The main class of package is MHamlet\Apidocs\Generator
// Let's write a simple "use"
use MHamlet\Apidocs\Generator;

// Generator has two statically declared methods - "forAllRoutes" and "forRoutesWithPrefix".

// The first one will provide you to generate documentation for all defined
// routes in your application.
$routeGenerator = Generator::forAllRoutes();

// The second one will provide you to generate documentation for routes,
// which URL's starts with given prefix.
$routeGenerator = Generator::forRoutesWithPrefix('api');

// The route generator also has two methods - "describeRoutes" and "generate"

// The first one will parse and describe the routes for you.
$routeGenerator->describeRoutes()

// It will return the following (the result is serialized in json to make it readable in this example)
/*
[
    {
        "path":"api/users",
        "controller":"App\\Http\\Controllers\\UserController",
        "method":"index",
        "verbs":[
            "GET",
            "HEAD"
        ]
    }
]
*/

// The second one will parse routes, controller comments and return the
// API documentation itself.
$routeGenerator->generate()

// It will return the following result
/*
[
    {
        "path":"api\/users",
        "verbs":[
            "GET",
            "HEAD"
        ],
        "description":"Returns list of all users",
        "params":[
            {
                "type":"int",
                "name":"from",
                "description":"test from"
            },
            {
                "type":"int",
                "name":"offset",
                "description":"test offset"
            }
        ],
    }
]
*/
```

### License

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e93f8ab1bba0d8bf35f68f4425e3e7367d50afeb51317aee0ccf1416924d834?d=identicon)[mhamlet](/maintainers/mhamlet)

---

Top Contributors

[![mhamlet](https://avatars.githubusercontent.com/u/1281731?v=4)](https://github.com/mhamlet "mhamlet (21 commits)")

### Embed Badge

![Health badge](/badges/mhamlet-laravel-apidocs/health.svg)

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

PHPackages © 2026

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