nrdq/laravel-request-docs

Automatically generate Laravel docs from request rules, controllers and routes

This package's canonical repository appears to be gone and the package has been frozen as a result.

dev-master 2021-12-06 09:55 UTC

This package is auto-updated.

Last update: 2024-02-06 14:36:31 UTC


README

Automatically generate api documentation for Laravel without writing annotations.

Read more: https://medium.com/web-developer/laravel-automatically-generate-api-documentation-without-annotations-a-swagger-alternative-e0699409a59e

Requirements

LangVersion
PHP7.4 or 8.0
Laravel6. or 8.

Installation

You can install the package via composer:

composer require nrdq/laravel-request-docs --dev

You can publish the config file with:

php artisan vendor:publish --tag=request-docs-config

Usage

View in the browser on `/request-docs/`

or generate a static HTML

php artisan lrd:generate

Docs HTML is generated inside the `docs/` folder.

Design pattern

In order for this plugin to work, you need to follow the design pattern by injecting the request class inside the controller. For extra documentation you can use markdown inside your controller method as well.

Design pattern

Screenshots

Generated API documentation

Preview

Try API

Preview

Testing

./vendor/bin/phpunit

Changelog

  • Initial Release