New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

johnylemon/explainer-lumen

API Explainer for Lumen Framework
11
Install
composer require johnylemon/explainer-lumen
Latest Version:1.0.1
Laravel:5
License:MIT
Last Updated:Sep 4, 2019
Links: GitHub  ·  Packagist
Maintainer: johnylemon

Explainer for Laravel

A simple Laravel api documentation generator

Features

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

Installation

  • add \Lemon\ExplainerLumen\Providers\ExplainerLumenServiceProvider to your app/bootstrap.php file
  • add $this->configure('explainer') to your app/bootstrap.php file after provider line
  • change bootstrap Application to provided by this package by changingthis lines
// $app = new Laravel\Lumen\Application(
//     dirname(__DIR__)
// );

into this

$app = new Lemon\ExplainerLumen\Application(
    dirname(__DIR__)
);
  • copy vendor/johnylemon/explainer/config/explainer.php file to your config directory

How to use

Simply call explain method on your routes:

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

Examples

Explain file generation

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

php artisan explain:route IndexRouteExplain

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

Simply type

php artisan explain

and... enjoy!

Related Packages

khazhinov/laravel-fly-docs

Library for generating documentation for the OpenApi 3.0 standard in the Laravel...

7,514 1
helingfeng/l5-swagger

OpenApi or Swagger integration to Laravel

11,097 0
digit-soft/laravel-swagger-generator

Swagger yaml generator

8,099 16
damian-nz/l5-swagger

Swagger integration to Laravel 5

4,165 3
nebo15/lumen.rest

Components for fast building REST API for Lumen

3,759 1

Version History

Version Released Laravel License
1.0.1 5.* MIT
v1.0.0 5.8.* MIT