PHPackages                             johnylemon/explainer - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. johnylemon/explainer

ActiveLibrary[HTTP &amp; Networking](/categories/http)

johnylemon/explainer
====================

API explainer

1.0.6(6y ago)0332MITPHP

Since May 15Pushed 6y agoCompare

[ Source](https://github.com/johnylemon/explainer)[ Packagist](https://packagist.org/packages/johnylemon/explainer)[ RSS](/packages/johnylemon-explainer/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (7)Used By (2)

### Explainer

[](#explainer)

A simple Laravel and Lumen api documentation generator

### Features

[](#features)

This tool makes possible to explain every app route by using simple `explain` method via clean document accessible under configured route address.

### How to use

[](#how-to-use)

Simply call `explain` method on your routes:

Laravel:

```
Route::get('/', 'IndexController@index')->explain(\App\Explains\IndexRouteExplain::class);

```

Lumen:

```
$router->get('/', 'IndexController@index')->explain(\App\Explains\IndexRouteExplain::class);

```

### Examples

[](#examples)

#### Explain file generation

[](#explain-file-generation)

To generate route explain file with name `IndexRouteExplain` in `app/Explains` directory simply type:

```
php artisan explain:route IndexRouteExplain

```

#### Explain params definition

[](#explain-params-definition)

Every route explain class contains methods `params`, `input` and `query`.

- `params` method should return array of parameters that are part of uri
- `input` method should return array of formData properties
- `query` method should return array of available route query param

example:

```
public function input() : array
{
    return [
        Param::integer('parent_id')->description('parent_id of object'),
        Param::string('title')->description('reqiored title')->required(),
        Param::string('language')->default('en')->possible(['en', 'pl'])->description('language with possible values of en or pl, ehwre en will be used if not provided'),
        Param::make('meta', 'weirdtype')->default(TRUE)->description('some meta field od weirdtype type, with true as default value')
    ];
}

```

To generate route explain file with name `IndexRouteExplain` in `app/Explains` directory simply type:

```
php artisan explain:route IndexRouteExplain

```

#### Explain example generation

[](#explain-example-generation)

To generate route explain example file with name `ValidationExample` in `app/Explains/Examples` directory simply type:

```
php artisan explain:example ValidationExample

```

#### Generate documentation

[](#generate-documentation)

Simply type

```
php artisan explain

```

and... enjoy!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~28 days

Total

6

Last Release

2443d ago

### Community

Maintainers

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

---

Top Contributors

[![johnylemon89](https://avatars.githubusercontent.com/u/86289323?v=4)](https://github.com/johnylemon89 "johnylemon89 (5 commits)")

---

Tags

apirestswagger

### Embed Badge

![Health badge](/badges/johnylemon-explainer/health.svg)

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

###  Alternatives

[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[tartanlegrand/laravel-openapi

Generate OpenAPI Specification for Laravel Applications

38178.7k2](/packages/tartanlegrand-laravel-openapi)[dreamfactory/javascript-sdk

DreamFactory Services Platform(tm) Javascript SDK

515.6k1](/packages/dreamfactory-javascript-sdk)

PHPackages © 2026

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