targettech/laravel-api-doc-generator

Auto generate Laravel api documentation from form request rules, controllers and routes

dev-main 2022-09-15 13:15 UTC

This package is auto-updated.

Last update: 2024-09-15 17:50:46 UTC


README

Automatically generate api documentation for Laravel without writing annotations.

Requirements

Installation

You can install the package via composer:

composer require targettech/laravel-api-doc-generator --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 docs/.

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