GitHub - beyondcode/laravel-er-diagram-generator: Generate entity relation diagr...
source link: https://github.com/beyondcode/laravel-er-diagram-generator
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Laravel ER Diagram Generator
This package lets you generate entity relation diagrams by inspecting the relationships defined in your model files. It is highly customizable. Behind the scenes, it uses GraphViz to generate the graph.
Requirements
This package requires the graphviz
tool.
You can install Graphviz on MacOS via homebrew:
brew install graphviz
Installation
You can install the package via composer:
composer require beyondcode/laravel-er-diagram-generator --dev
If you are using Laravel 5.5+, the package will automatically register the service provider for you.
Usage
Once the package is installed, publish the configuration file using
php artisan vendor:publish --provider=BeyondCode\\ErdGenerator\\ErdGeneratorServiceProvider
Open the configuration file and add all folders, that contain your model files.
Generating Diagrams
You can generate entity relation diagrams using the provided artisan command:
php artisan generate:erd
This will generate a file called graph.png
.
You can also specify a custom filename:
php artisan generate:erd output.png
Or use one of the other output formats, like SVG:
php artisan generate:erd output.svg --format=svg
Customization
Please take a look at the published erd-generator.php
configuration file for all available customization options.
Examples
Here are some examples taken from the Laravel.io codebase.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK