Automatically generate beautiful, interactive documentation for Laravel projects in seconds.
- 📊 ERD — Entity Relationship Diagrams
- 📝 UML — Class Diagrams for Models
- 🔄 Sequence Diagrams — Component interaction flows
- 📚 API Docs — Endpoints, controllers, routes
- 🚀 Interactive Viewer — Browse via built-in web interface
- 🔍 Zero Config — Auto-analyzes Laravel project structure
npm install -g @priom7/laravel2doc
cd your-laravel-project
npm install @priom7/laravel2doc
Inside your Laravel project:
npx laravel2doc
This generates documentation in the laravel2doc/
folder and launches a web viewer.
Flag | Description | Default |
---|---|---|
-p, --port <num> |
Port for local server | 3333 |
-o, --output <dir> |
Directory to output documentation | laravel2doc |
Try it outside a Laravel project to see a live example:
npx laravel2doc
- Tables, columns, data types
- Primary/foreign keys, relationships
- Model properties, methods
- Relationships and inheritance
- Controller method flows
- CRUD interaction flow
- Routes, HTTP methods, controllers
- Parameter and handler mappings
- Scans Laravel models for relationships and attributes
- Parses migrations to reconstruct DB schema
- Analyzes controllers and route files
- Generates Mermaid-based diagrams and structured API docs
- Serves everything via a local web interface
- Node.js 14+
- Laravel 8+ project
Contributions are welcome! Feel free to submit a pull request or feature request.
Created by @priom7 Md Sharif Alam
🌟 Found it useful? Give it a ⭐ on GitHub and share with Laravel developers!