kabochan73 / er-generate
Generate Mermaid ER diagrams from Laravel migration files
v1.0.0
2026-06-02 09:45 UTC
Requires
- php: ^8.1
- illuminate/console: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
README
A Laravel package that generates Mermaid ER diagrams from your migration files.
Requirements
- PHP 8.1+
- Laravel 10, 11, 12, or 13
Installation
composer require kabochan73/er-generate
The service provider is auto-discovered by Laravel — no manual registration needed.
Usage
php artisan er:generate
Generates er.html in the current directory. Open it in any browser to view the diagram.
# macOS open er.html # Linux xdg-open er.html # Windows start er.html
Output
er.html — a standalone HTML file with an interactive Mermaid ER diagram.
users ||--o{ posts : ""
Relationships are automatically detected from foreignId()->constrained() and foreign()->references()->on() syntax.
License
MIT