Laravel ERD generator

https://opengraph.githubassets.com/d5fcf2928c5bfc84c7e461d6ca2b9ba567fc369f37486ee3f043952f6437531f/recca0120/laravel-erd

Latest Version on Packagist
GitHub Tests Action Status
Total Downloads

Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel models and displays them
using erd-editor.

Here’s a sample of what you can expect, generated from migrations
and models:

View Live Demo

erd-editor

Lang Version
PHP 7.4, 8.0, 8.1, 8.2, 8.3
Laravel 8, 9, 10, 11

Install the package via Composer:

composer require recca0120/laravel-erd:^0.1 --dev

Run the following command:

Step 2: View the ERD

Open the following URL in your browser:

http://localhost/laravel-erd

Exclude Tables and Save to a Different Filename

Run the command:

php artisan erd:generate --file=exclude-users.sql --exclude=users

Open the URL:

http://localhost/laravel-erd/exclude-users

Install erd-go
and graphviz-dot.js using:

Generate the SVG file:

php artisan generate --file=laravel-erd.svg

View the SVG version:

http://localhost/laravel-erd/laravel-erd.svg

svg

The SVG file can be found at storage/framework/cache/laravel-erd.

Feel free to ask if you have any questions or need further assistance!

Laravel News Links