PHPackages                             irabbi360/laravel-api-inspector - 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. [API Development](/categories/api)
4. /
5. irabbi360/laravel-api-inspector

ActiveLibrary[API Development](/categories/api)

irabbi360/laravel-api-inspector
===============================

Laravel Auto Generate API Documentation for request rules, parameters and API Response

v1.2.2(4mo ago)26488↓64.3%1MITPHPPHP ^8.1 | ^8.2 | ^8.3CI passing

Since Dec 24Pushed 4mo agoCompare

[ Source](https://github.com/irabbi360/laravel-api-inspector)[ Packagist](https://packagist.org/packages/irabbi360/laravel-api-inspector)[ Docs](https://github.com/irabbi360/laravel-api-inspector)[ GitHub Sponsors](https://github.com/Irabbi360)[ RSS](/packages/irabbi360-laravel-api-inspector/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (5)Dependencies (12)Versions (6)Used By (0)

Laravel API Inspector - Auto-Generate API Documentation
=======================================================

[](#laravel-api-inspector---auto-generate-api-documentation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5b54f0258698990d4ed9f3d770e01b2b56a2f6f08479940d94dbb68fdc48c71f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6972616262693336302f6c61726176656c2d6170692d696e73706563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/irabbi360/laravel-api-inspector)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9b110580dbd38a0e10561cde7a3d5e7eb8197c23bc502b0d60a861a2560e431c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6972616262693336302f6c61726176656c2d6170692d696e73706563746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/irabbi360/laravel-api-inspector/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/35df45ffc5f34cd889f9259fad37cd31154fb764cba321c0b68f945a34cd5d5c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6972616262693336302f6c61726176656c2d6170692d696e73706563746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/irabbi360/laravel-api-inspector/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f05c737c9276f10b4d41c02ce4b565c3b554c50146f41806f82ead7b1535ce65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6972616262693336302f6c61726176656c2d6170692d696e73706563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/irabbi360/laravel-api-inspector)

[![Laravel API Inspector](https://github.com/irabbi360/laravel-api-inspector/raw/main/banner_preview.png?raw=true)](https://github.com/irabbi360/laravel-api-inspector/blob/main/banner_preview.png?raw=true)

**Laravel API Inspector** automatically generates API documentation from your Laravel routes, FormRequest validation rules, and API Resources. It's like Postman + Swagger combined, but deeply integrated with Laravel.

Features
--------

[](#features)

✨ **Auto-Parse FormRequest Rules** - Converts Laravel validation rules into comprehensive documentation
📮 **Generate Postman Collections** - Create ready-to-use Postman collections with examples
📖 **OpenAPI/Swagger Specs** - Export to OpenAPI 3.0 format for tools like Swagger UI and Redoc
📄 **HTML Documentation** - Beautiful, auto-generated HTML documentation with examples
🔍 **API Resource Detection** - Extract response structures from your API Resources
💾 **Save Response Examples** - Automatically save JSON responses to files
🔐 **Authentication Support** - Automatically detect protected routes and add auth headers

Installation
------------

[](#installation)

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

[](#requirements)

- **PHP:** 8.1 or higher
- **Laravel:** 10.0 or higher
- **Database:** MySQL 5.7+ / PostgreSQL 10+ / SQLite 3.8+

Get up and running in just two commands:

```
composer require irabbi360/laravel-api-inspector
```

Run the interactive installer
-----------------------------

[](#run-the-interactive-installer)

```
php artisan api-inspector:install
```

Quick Start
-----------

[](#quick-start)

### View Documentation in Browser

[](#view-documentation-in-browser)

After generating documentation, visit:

```
http://localhost:8000/api-docs

```

### Create a FormRequest with Validation Rules

[](#create-a-formrequest-with-validation-rules)

```
