Laravel Entity Relation (ER) Diagram Generator is a package by Marcel Pociot that lets you generate entity relation diagrams by inspecting the relationships defined in your model classes. It produces images using GraphViz.
Use our latest package to generate entity relation diagrams out of your @laravelphp model files.
The package is highly customizable and can inspect your table schema.
— Marcel Pociot (@marcelpociot) July 3, 2018
The ER Diagram package is highly customizable, including Graphviz options that you want to be applied to your graph, table styles, and model paths, to name a few.
For example, if your model classes live in a different namespace than the default path, you can configure multiple paths with the following configuration:
1'directories' => [2 app_path('models'), // app/models/3],
Check out the package configuration file for full customization and configuration details.
To generate your application’s visual model graph, you use the artisan console command:
1php artisan generate:erd23# Custom filename4php artisan generate:erd output.png56# SVG format7php artisan generate:erd output.svg --format=svg