laravel-api-docs maintained by rbr
Description
A self-analyzing tool that scans a Laravel project's routes, controllers, and FormRequests to generate browsable API documentation.
Author
Last update
2026/03/30 08:35
(dev-main)
License
Downloads
10
RBR Laravel API Doc
A self-analyzing tool that scans a Laravel project's routes, controllers, and FormRequests to generate browsable API documentation.
Author: Rashedul Bari Raju (rbraju3m@gmail.com)
Installation
composer require rbr/laravel-api-docs
The package uses Laravel's auto-discovery, so the service provider will be registered automatically.
Setup
1. Publish the config file
php artisan vendor:publish --tag=api-docs-config
2. Run the migrations
php artisan migrate
3. Publish frontend assets (optional)
php artisan vendor:publish --tag=api-docs-assets
php artisan vendor:publish --tag=api-docs-css
php artisan vendor:publish --tag=api-docs-views
Usage
Generate API Documentation
php artisan api-docs:generate
php artisan api-docs:generate --project={id}
Browse Documentation
Visit http://your-app.test/docs/api
Configuration
Edit config/api-docs.php:
return [
'title' => env('API_DOCS_TITLE', 'API Documentation'),
'description' => env('API_DOCS_DESCRIPTION', 'Auto-generated API documentation'),
'exclude_prefixes' => ['_ignition', '_debugbar', 'sanctum', 'docs/api', 'up'],
'route_prefix' => 'docs/api',
'middleware' => ['web'],
'copyright' => 'RBR Laravel API Doc',
];
Features
- Auto-scans Laravel routes, controllers, and FormRequests
- Parses docblock comments for endpoint descriptions
- Detects validation rules (FormRequest, inline, Validator::make)
- Generates realistic response examples from model $fillable, $casts, and migrations
- Supports external Laravel project scanning
- Manual endpoint CRUD
- Beautiful UI with React 19, Mantine UI v8, and Inertia.js
- Dashboard with stats, method distribution, and search
Requirements
- PHP 8.2+
- Laravel 11 or 12
- Inertia.js with React
License
MIT
© RBR Laravel API Doc by Rashedul Bari Raju. All rights reserved.