PHPackages                             icodestuff/ladocumenter - 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. icodestuff/ladocumenter

ActiveLibrary[API Development](/categories/api)

icodestuff/ladocumenter
=======================

Automatically generate beautiful API documentation for your Laravel API routes using annotations.

1.0.1(5y ago)11781↓100%3[5 issues](https://github.com/icodestuff-io/ladocumenter/issues)[1 PRs](https://github.com/icodestuff-io/ladocumenter/pulls)MITPHPPHP ^7.4

Since Nov 20Pushed 4y agoCompare

[ Source](https://github.com/icodestuff-io/ladocumenter)[ Packagist](https://packagist.org/packages/icodestuff/ladocumenter)[ RSS](/packages/icodestuff-ladocumenter/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

 [![logo](https://github.com/icodestuff-io/ladocumenter/raw/master/logo.png)](https://github.com/icodestuff-io/ladocumenter/raw/master/logo.png)

 [![CircleCI](https://github.com/icodestuff-io/ladocumenter/workflows/LaDocumenter/badge.svg)](https://github.com/icodestuff-io/ladocumenter/workflows/LaDocumenter/badge.svg) [![Total Downloads](https://camo.githubusercontent.com/a7306de9a32a96ff16310347f5b8032e68179aab972f9507c4a8ba1dde381bb0/68747470733a2f2f706f7365722e707567782e6f72672f69636f646573747566662f6c61646f63756d656e7465722f642f746f74616c2e737667)](https://packagist.org/packages/icodestuff/ladocumenter) [![Latest Stable Version](https://camo.githubusercontent.com/183e4658c67cffe25c5d625d7101d6f1d2f27afa1cc2de424ca67ebf1db27376/68747470733a2f2f706f7365722e707567782e6f72672f69636f646573747566662f6c61646f63756d656e7465722f762f737461626c652e737667)](https://packagist.org/packages/icodestuff/ladocumenter) [![License](https://camo.githubusercontent.com/084b5f4d257952c6a9eacc8d4d5d19a1ed41ea5bf988fb07403adf040f0d0bc7/68747470733a2f2f706f7365722e707567782e6f72672f69636f646573747566662f6c61646f63756d656e7465722f6c6963656e73652e737667)](https://packagist.org/packages/icodestuff/ladocumenter)

Automatically generate beautiful API documentation for your Laravel API routes using annotations.

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

[](#installation)

PHP 7.4 and Laravel 7 or higher are required.

#### Installing

[](#installing)

You will need LaRecipe to serve your autogenerated markdown

run `composer require --dev binarytorch/larecipe && composer require --dev icodestuff/ladocumenter`to download both LaRecipe and LaDocumenter as a dev dependency

Then `php artisan larecipe:install` to install Larecipe

And lastly publish the config `php artisan vendor:publish --provider="Icodestuff\LaDocumenter\LaDocumenterServiceProvider"`

Demo Video
----------

[](#demo-video)

Here is a YouTube video showcasing the LaDocumenter package

[![Demo](https://camo.githubusercontent.com/873cfcb931de6d31807640123328f45b8a8d3e427425f1b7fbc9583c3c531771/687474703a2f2f69332e7974696d672e636f6d2f76692f666f4265665344336e51412f6d617872657364656661756c742e6a7067)](https://youtu.be/foBefSD3nQA)

Getting Started
---------------

[](#getting-started)

The only endpoints that are documented are the ones in your api.php file.

### Generating Documentation

[](#generating-documentation)

In order to compile your annotations to markdown you will need to run:

`php artisan ladocumenter:generate`

### Grouping Endpoints

[](#grouping-endpoints)

All endpoints are grouped for easy organization. Only use `@Group` to group endpoints in a single controller class by adding it to the top of the controller like so:

##### Example

[](#example)

```
/**
 * @Group(name="Foo", description="This is an example group.")
 */
class FooController extends Controller
{

}
```

##### Attributes

[](#attributes)

- Name (required)
- Description (optional)

### Documenting Endpoints

[](#documenting-endpoints)

The `@Endpoint` annotation is used for a single controller method or endpoint. *Note, at this time we don't support closures or resources 😕*

#### Example

[](#example-1)

```
class FooController extends Controller
{
    /**
    * @Endpoint(name="Example", description="This is an example endpoint.")
     */
    public function bar()
    {

    }
}
```

##### Attributes

[](#attributes-1)

- Name (required)
- Description (optional)

### Specifying Request Parameters

[](#specifying-request-parameters)

To specify a list of valid parameters your API route accepts, use the `@QueryParam` or `@BodyParam`.

Both the `@BodyParam` &amp; `@QueryParam` annotation takes the name, type, required, description and an example.

#### @BodyParam Example

[](#bodyparam-example)

```
class FooController extends Controller
{
    /**
    * @BodyParam(name="foo", type="string", status="required", description="An example body paramater", example="bar")
     */
    public function bar(FormRequest $request)
    {

    }
}
```

#### @QueryParam Example

[](#queryparam-example)

```
class FooController extends Controller
{
    /**
    * @QueryParam(name="foo", type="string", status="optional", description="An example query paramater", example="bar")
     */
    public function bar()
    {

    }
}
```

#### Attributes

[](#attributes-2)

- Name (required)
- Type (required)
- IsRequired (required)
- Description (optional)
- Example (optional)

### Generating Responses

[](#generating-responses)

To generate a response, you must use the `@ResponseExample` annotation. This takes in the status of the response as well as a link to the response file like so:

```
class FooController extends Controller
{
    /**
    * @ResponseExample(status=200, file="responses/example.json")
     */
    public function bar()
    {
        return response()->json(['foo' => 'bar']);
    }
}
```

##### Attributes

[](#attributes-3)

- Status (required)
- Example (required)

Be sure to add your responses to the storage directory as that is where LaDocumenter looks for them. We recommend automatically generating responses using Laravel's testing suite.

### Indicating Authentication Status

[](#indicating-authentication-status)

LaDocumenter automatically labels an endpoint as authenticated if the route uses the middleware defined in the `config/ladocumenter.php` file:

```
'auth_middleware' => [
    'auth:sanctum',
    'auth'
],

```

If you are using a separate auth middleware, be sure to define it in the config file.

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~3 days

Total

2

Last Release

1944d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/180fec65ce73b52ee74a22c013fa889cc316bae04d1477a7423e6f71918d67c0?d=identicon)[solomon\_04](/maintainers/solomon_04)

---

Top Contributors

[![Solomon04](https://avatars.githubusercontent.com/u/35110194?v=4)](https://github.com/Solomon04 "Solomon04 (11 commits)")[![Julius-Bendt](https://avatars.githubusercontent.com/u/22844949?v=4)](https://github.com/Julius-Bendt "Julius-Bendt (1 commits)")

---

Tags

documentationswaggeropenapiapidoclarecipelaravel-apiapi-documentationdocumenter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/icodestuff-ladocumenter/health.svg)

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

###  Alternatives

[swagger-api/swagger-ui

 Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

28.7k44.1M86](/packages/swagger-api-swagger-ui)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k33.0M97](/packages/darkaonline-l5-swagger)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3342.3M3](/packages/darkaonline-swagger-lume)[johnylemon/laravel-apidocs

Laravel API documentation generating tool

462.8k](/packages/johnylemon-laravel-apidocs)[adrenalinkin/swagger-resolver-bundle

Provides possibility for validate data according to Swagger documentation

1013.3k](/packages/adrenalinkin-swagger-resolver-bundle)

PHPackages © 2026

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