Generating an Entity-Relationship Diagram

In the vastness of the Internet, I found a convenient package for Laravel, which automatically generates “Entity-Relationship” diagrams from your Laravel models and displays them using erd-editor. The result is very convenient and beautiful.

The package is called recca0120/laravel-erd. The installation process of the package is simple.

Installation

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

And we run the script

php artisan erd:generate

Path to the diagram in the application:

http://localhost/laravel-erd

As a result of the actions we get the following result

By the way, in the official repo on gh You can also see additional information on how to export a diagram to SVG, which is also a pretty convenient feature.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *