rakutentech / laravel-request-docs by kevincobain2000

Automatically generate Laravel docs from request rules, controllers and routes
523,111
654
20
Package Data
Maintainer Username: kevincobain2000
Maintainer Contact: pulkit.kathuria@rakuten.com (Pulkit Kathuria)
Package Create Date: 2021-08-18
Package Last Update: 2024-04-03
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-05-04 15:15:52
Package Statistics
Total Downloads: 523,111
Monthly Downloads: 26,772
Daily Downloads: 646
Total Stars: 654
Total Watchers: 20
Total Forks: 99
Total Open Issues: 4

Laravel Docs Generator

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

| Lang | Version | | :------ | :--------- | | PHP | 7.4 or 8.0 | | Laravel | 6.* or 8.* |

Installation

You can install the package via composer:

composer require rakutentech/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 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