PHPackages                             rakutentech/laravel-request-docs - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rakutentech/laravel-request-docs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rakutentech/laravel-request-docs
================================

Automatically generate Laravel docs from request rules, controllers and routes

v2.44(1mo ago)7861.2M—3.5%107[7 issues](https://github.com/rakutentech/laravel-request-docs/issues)[1 PRs](https://github.com/rakutentech/laravel-request-docs/pulls)2MITPHPPHP ^7.4|^8.0|^8.1|^8.2|^8.3|^8.4CI passing

Since Aug 19Pushed 1mo ago21 watchersCompare

[ Source](https://github.com/rakutentech/laravel-request-docs)[ Packagist](https://packagist.org/packages/rakutentech/laravel-request-docs)[ Docs](https://github.com/rakutentech/laravel-request-docs)[ RSS](/packages/rakutentech-laravel-request-docs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (28)Versions (80)Used By (2)

 [ ![Laravel Request Docs](https://camo.githubusercontent.com/084b3daabcd733b11f4895a79aa3b64a458fa5933c42dd1d0168dd883457daf6/68747470733a2f2f696d6775722e636f6d2f4e75514e7838762e706e67) ](https://github.com/rakutentech/laravel-request-docs)

 The Hassle-Free automatic API documentation generation for Laravel.
 A Swagger alternative.
 Supports Open API 3.0.0

  **[Try latest DEMO!](https://rakutentech.github.io/laravel-request-docs/?api=https://raw.githubusercontent.com/rakutentech/laravel-request-docs/master/ui/public/sample.json)**

 [![CI Node](https://github.com/rakutentech/laravel-request-docs/actions/workflows/node.yml/badge.svg?branch=master)](https://github.com/rakutentech/laravel-request-docs/actions/workflows/node.yml/badge.svg?branch=master) [![CI PHP](https://github.com/rakutentech/laravel-request-docs/actions/workflows/phptest.yml/badge.svg?branch=master)](https://github.com/rakutentech/laravel-request-docs/actions/workflows/phptest.yml/badge.svg?branch=master)

**Fast** Install on any Laravel Project

**Hassle Free** Auto Generate API Documentation for request rules and parameters

**Analyze** Inbuilt SQL query time analyzer, response time and headers output.

**Supports** Postman and OpenAPI 3.0.0 exports.

Features
--------

[](#features)

- Light and Dark mode
- Automatic rules fetching from injected Request and by regexp
- Automatic routes fetching from Laravel Routes
- Support for Laravel logs
- Support for SQL query and query time
- Support for HTTP response time and memory consumption
- Support for Authorization Headers
- Support for File uploads
- Support for Eloquents events
- Display extra documentation using markdown
- Saves history previous requests
- Added filters to sort, group and filter routes by methods, controllers, middlewares, routes
- Export Laravel API, routes, rules and documentation to Postman and OpenAPI 3.0.0

Read on Medium
==============

[](#read-on-medium)

Automatically generate API documentation for Laravel without writing annotations.

Read more:

Requirements
------------

[](#requirements)

LangVersionsPHP7.4 or 8.0 or 8.1 or 8.2Laravel6.\* or 8.\* or 9.\* or 10.\*Installation
============

[](#installation)

You can install the package via composer:

```
composer require rakutentech/laravel-request-docs
```

You can publish the config file with:

```
php artisan vendor:publish --tag=request-docs-config
php artisan route:cache

# Optional publish assets
# php artisan vendor:publish --tag=request-docs-assets
```

(optional) Add the following middleware to your API, so that the SQL logs and model events are captured.

`app/Http/Kernel.php`

```
        'api' => [
            ...
            \Rakutentech\LaravelRequestDocs\LaravelRequestDocsMiddleware::class,
            ... and so on
```

Usage
=====

[](#usage)

Dashboard
---------

[](#dashboard)

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

Design pattern
==============

[](#design-pattern)

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](https://camo.githubusercontent.com/c8df93a2782634c01caca681fdf553fcddd534d3875b84f3122326b42fb292c7/68747470733a2f2f696d6775722e636f6d2f79586a71336a702e706e67)](https://camo.githubusercontent.com/c8df93a2782634c01caca681fdf553fcddd534d3875b84f3122326b42fb292c7/68747470733a2f2f696d6775722e636f6d2f79586a71336a702e706e67)

Screenshots
===========

[](#screenshots)

**Dark and Light Modes**

 [![](https://camo.githubusercontent.com/f478468275239dcb49e3b7c3938d0fa1101b404e72d7e4a15e711062df17daf1/68747470733a2f2f696d6775722e636f6d2f764f4d4d59566c2e706e67)](https://camo.githubusercontent.com/f478468275239dcb49e3b7c3938d0fa1101b404e72d7e4a15e711062df17daf1/68747470733a2f2f696d6775722e636f6d2f764f4d4d59566c2e706e67) [![](https://camo.githubusercontent.com/3104be6846cc73de89bf26015bd07316fa34b7633af1d70e127908470e7840ce/68747470733a2f2f696d6775722e636f6d2f485a764e4f466d2e706e67)](https://camo.githubusercontent.com/3104be6846cc73de89bf26015bd07316fa34b7633af1d70e127908470e7840ce/68747470733a2f2f696d6775722e636f6d2f485a764e4f466d2e706e67)

- Uses local storage to save the history of previous requests and request headers.
- Request, SQL, response and events timeline below:

 [![](https://camo.githubusercontent.com/f5d88db3bee2ca6dc1cf21758548f8e5038a43b9898f3b65ed00729d0480661b/68747470733a2f2f696d6775722e636f6d2f666430396a77312e706e67)](https://camo.githubusercontent.com/f5d88db3bee2ca6dc1cf21758548f8e5038a43b9898f3b65ed00729d0480661b/68747470733a2f2f696d6775722e636f6d2f666430396a77312e706e67) [![](https://camo.githubusercontent.com/be262bc456a4768605b87ac8a1099e4af137812df69e4714b3da2fc182719f92/68747470733a2f2f696d6775722e636f6d2f38504c4c6c48762e706e67)](https://camo.githubusercontent.com/be262bc456a4768605b87ac8a1099e4af137812df69e4714b3da2fc182719f92/68747470733a2f2f696d6775722e636f6d2f38504c4c6c48762e706e67)

 [![](https://camo.githubusercontent.com/b079743a371f965d4d3ea0ff577b9fbb52482869b4070613135751700a21ad65/68747470733a2f2f696d6775722e636f6d2f713364377077322e706e67)](https://camo.githubusercontent.com/b079743a371f965d4d3ea0ff577b9fbb52482869b4070613135751700a21ad65/68747470733a2f2f696d6775722e636f6d2f713364377077322e706e67) [![](https://camo.githubusercontent.com/1c369ef6b0199aa5306dfeb8518e57830588420075f812d0461bffccab12c1df/68747470733a2f2f696d6775722e636f6d2f41485443554f4a2e706e67)](https://camo.githubusercontent.com/1c369ef6b0199aa5306dfeb8518e57830588420075f812d0461bffccab12c1df/68747470733a2f2f696d6775722e636f6d2f41485443554f4a2e706e67)

**Settings to sort, group and filter**

 [![](https://camo.githubusercontent.com/e4efbf4abe38618f5f5ff34f6bb652762253d432bc060955384aaa83014bdd05/68747470733a2f2f696d6775722e636f6d2f5347586c49626c2e706e67)](https://camo.githubusercontent.com/e4efbf4abe38618f5f5ff34f6bb652762253d432bc060955384aaa83014bdd05/68747470733a2f2f696d6775722e636f6d2f5347586c49626c2e706e67) [![](https://camo.githubusercontent.com/1748b118370b3217428a5f867082a0cd0a63449bb3ac00fb3ace4b84542cbd19/68747470733a2f2f696d6775722e636f6d2f576232416d5a6c2e706e67)](https://camo.githubusercontent.com/1748b118370b3217428a5f867082a0cd0a63449bb3ac00fb3ace4b84542cbd19/68747470733a2f2f696d6775722e636f6d2f576232416d5a6c2e706e67)

Extra documentation
===================

[](#extra-documentation)

You can write extra documentation in markdown using `@lrd` in the PHPDoc on the `rules` method of the `Request` classes and on the controller methods.
This will then be rendered as HTML on the dashboard.
Documentation defined on the controller method is appended below documentation defined on the `rules` method.
Example of using it in the controller:

```
    /**
     * @lrd:start
     * # Hello markdown
     * Free `code` or *text* to write documentation in markdown
     * @lrd:end
     */
    public function index(MyIndexRequest $request): Resource
    {
```

Extra parameters
================

[](#extra-parameters)

You define extra parameters using `@LRDparam`.
You can use `@LRDparam` in PHPDoc on both the `rules` methods and the controller methods.
You can also overwrite rules using `@LRDparam`. Meaning, when rules are defined in the `rules` method, you can overwrite those rules using `@LRDparam` in the PHPDoc above the `rules` method. And you can overwrite those rules using `@LRDparam` in a PHPDoc on the controller methods.
So, the precedence is `Controller method PHPDoc` &lt; `Rules method PHPDoc` &lt; `Rules method values`.

```
    /**
     * @LRDparam username string|max:32
     * // either space or pipe
     * @LRDparam nickaname string|nullable|max:32
     * // override the default response codes
     * @LRDresponses 200|422
     */
    public function index(MyIndexRequest $request): Resource
    {
```

Response codes
==============

[](#response-codes)

Without explicitly declaring response codes, all routes are documented to return any of the response codes defined in the request-docs.php `default_responses` configuration.
However, using `@LRDresponse 200|422` (spaces or pipes) within the PHPDoc on your controller methods, you are able to explicitly define what status codes can be returned by the server.

Configuration
=============

[](#configuration)

Please view the `request-docs.php` config file to see how you can customise your experience.

Testing
=======

[](#testing)

```
./vendor/bin/phpunit
```

Linting
=======

[](#linting)

```
./vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=tests/migrations config/ src/
```

Fixing lints

```
./vendor/bin/php-cs-fixer fix src/
./vendor/bin/php-cs-fixer fix config/
```

Star History
------------

[](#star-history)

[![Star History Chart](https://camo.githubusercontent.com/d21bbb423089db69e32beaedeea99734841845e168fedba553622a53ce09ca36/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d72616b7574656e746563682f6c61726176656c2d726571756573742d646f637326747970653d44617465)](https://star-history.com/#rakutentech/laravel-request-docs&Date)

Changelog
=========

[](#changelog)

- Initial Release
- v1.9 Added improvements such as status code, response headers, custom request headers and fixed issues reported by users
- v1.10 Show PHP memory usage, gzip encoding fix
- v1.12 Bug fix of id, and Laravel 9 support
- v1.13 Laravel 9 support
- v1.15 Adds Filter and fall back to regexp upon Exception
- v1.17 Do not restrict to FormRequest
- v1.18 Fix where prism had fixed height. Allow the text area resize.
- v1.18 Updated UI and pushed unit tests
- v1.19 Exception -&gt; Throwable for type error
- v1.20 Feature support open api 3.0.0 #10
- v1.21 Ability to add custom params
- v1.22 Boolean|File|Image support
- v1.22 Boolean|File|Image support
- v1.23 Bug fix for LRD doc block #76
- v1.27 A few fixes on width and added request\_methods
- v2.0 UI Renewal to React Static
    - `@QAParam` is now `@LRDparam`
    - No special changes for users, upgrade to v2.x as usual
    - Upgrading users will need to republish config
- v2.1 UI - adds search bar and few alignment fixes on table
- v2.2 PHP 8.1 and 8.2 support added - Groupby enabled for routes and controllers
- v2.3 Bug fix for local storage (tabs) and full UI refactored after alpha
- v2.4 Show version on navbar and curl is using ace editor
- v2.5 Groupby final fix and local storage clear button. Other UI refactor
- v2.6 File uploads
- v2.7 Show activity on Eloquent models
- v2.8 Show full activity on Eloquent models
- v2.13 Bug fixes, and nested params support
- v2.14 Adds path params support
- v2.16 Top Navbar is fixed
- v2.19 Publish \_astro assets
- v2.25 `laravel-request-docs:export` command to export
- v2.28 Allow extra documentation to be defined on the `rules` method of the Request class. By @Ken-vdE
- v2.31 Customized title, vup js and PHP to latest. Customized headers. Save response history.
- v2.40 A few bug fixes.
- v2.42 Laravel 12 support

Contributors
============

[](#contributors)

[ ![](https://camo.githubusercontent.com/3e743d2280c9a034169c98829a1a6a1217931f294cd7b00a5df348e6128c4334/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d72616b7574656e746563682f6c61726176656c2d726571756573742d646f6373)](https://github.com/rakutentech/laravel-request-docs/graphs/contributors)

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity63

Solid adoption and visibility

Community35

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 67.2% 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 ~143 days

Total

76

Last Release

56d ago

Major Versions

1.31 → 2.02023-02-18

PHP version history (5 changes)1.0PHP ^7.3|^7.4|^8.0

1.12PHP ^7.4|^8.0

2.2PHP ^7.4|^8.0|^8.1|^8.2

v2.31PHP ^7.4|^8.0|^8.1|^8.2|^8.3

v2.42PHP ^7.4|^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c550bc7dd7e314f127ded1da50624d7405ce2a5f9b005a8ed52fcb09e489022?d=identicon)[kevincobain2000](/maintainers/kevincobain2000)

---

Top Contributors

[![kevincobain2000](https://avatars.githubusercontent.com/u/629055?v=4)](https://github.com/kevincobain2000 "kevincobain2000 (326 commits)")[![kitloong](https://avatars.githubusercontent.com/u/7660346?v=4)](https://github.com/kitloong "kitloong (75 commits)")[![hafijul233](https://avatars.githubusercontent.com/u/24684511?v=4)](https://github.com/hafijul233 "hafijul233 (21 commits)")[![rawahamid](https://avatars.githubusercontent.com/u/27570598?v=4)](https://github.com/rawahamid "rawahamid (7 commits)")[![brel-pro](https://avatars.githubusercontent.com/u/36497183?v=4)](https://github.com/brel-pro "brel-pro (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")[![asurcodes](https://avatars.githubusercontent.com/u/25269358?v=4)](https://github.com/asurcodes "asurcodes (4 commits)")[![Mdhesari](https://avatars.githubusercontent.com/u/28428724?v=4)](https://github.com/Mdhesari "Mdhesari (3 commits)")[![MizouziE](https://avatars.githubusercontent.com/u/90829439?v=4)](https://github.com/MizouziE "MizouziE (3 commits)")[![DeDmytro](https://avatars.githubusercontent.com/u/13836815?v=4)](https://github.com/DeDmytro "DeDmytro (3 commits)")[![cdmathukiya](https://avatars.githubusercontent.com/u/18529326?v=4)](https://github.com/cdmathukiya "cdmathukiya (3 commits)")[![Plong-Wasin](https://avatars.githubusercontent.com/u/72617740?v=4)](https://github.com/Plong-Wasin "Plong-Wasin (3 commits)")[![nimah79](https://avatars.githubusercontent.com/u/20343056?v=4)](https://github.com/nimah79 "nimah79 (2 commits)")[![daprezjer](https://avatars.githubusercontent.com/u/1242929?v=4)](https://github.com/daprezjer "daprezjer (2 commits)")[![NikolaRHristov](https://avatars.githubusercontent.com/u/90222871?v=4)](https://github.com/NikolaRHristov "NikolaRHristov (2 commits)")[![Ken-vdE](https://avatars.githubusercontent.com/u/15888558?v=4)](https://github.com/Ken-vdE "Ken-vdE (2 commits)")[![souravdutt](https://avatars.githubusercontent.com/u/49240259?v=4)](https://github.com/souravdutt "souravdutt (1 commits)")[![davlet42](https://avatars.githubusercontent.com/u/49448966?v=4)](https://github.com/davlet42 "davlet42 (1 commits)")[![digitall-it](https://avatars.githubusercontent.com/u/3578378?v=4)](https://github.com/digitall-it "digitall-it (1 commits)")

---

Tags

laravellaravel-apilaravel-documentationlaravel-packagelaravel-swaggerlaravel-swagger-generatorphplaravelrakutentechlaravel-request-docs

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rakutentech-laravel-request-docs/health.svg)

```
[![Health](https://phpackages.com/badges/rakutentech-laravel-request-docs/health.svg)](https://phpackages.com/packages/rakutentech-laravel-request-docs)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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