wutaophp/laravel-er-diagram-generator
Composer 安装命令:
composer require wutaophp/laravel-er-diagram-generator
包简介
Generate ER diagrams from your Laravel models.
README 文档
README
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.
If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course.
Prerequisites
The minimum required PHP version is 7.1.0.
Requirements
This package requires the graphviz tool.
You can install Graphviz on MacOS via homebrew:
brew install graphviz
Or, if you are using Homestead:
sudo apt-get install graphviz
To install Graphviz on Windows, download it from the official website.
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.
If you are using Lumen, you will need to add the following to bootstrap\app.php:
\\ Register Service Providers $app->register(BeyondCode\ErdGenerator\ErdGeneratorServiceProvider::class);
Usage
By default, the package will automatically detect all models in your app directory that extend the Eloquent Model class. If you would like you explicitly define where your models are located, you can publish the configuration file using the following command.
php artisan vendor:publish --provider=BeyondCode\\ErdGenerator\\ErdGeneratorServiceProvider
If you're using Lumen and you want to customize the config, you'll need to copy the config file from the vendor directory:
cp ./vendor/beyondcode/laravel-er-diagram-generator/config/config.php config/erd-generator.php
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 marcel@beyondco.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
wutaophp/laravel-er-diagram-generator 适用场景与选型建议
wutaophp/laravel-er-diagram-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 892 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 06 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel-er-diagram-generator」 「wutaophp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wutaophp/laravel-er-diagram-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wutaophp/laravel-er-diagram-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wutaophp/laravel-er-diagram-generator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Generate ER diagrams from your Laravel models.
Generate ER diagrams from your Laravel models.
Generate ER diagrams from your Laravel models.
Generate ER diagrams from your Laravel models.
Generate ER diagrams from your Laravel models.
Dcat Admin 操作日志扩展
统计信息
- 总下载量: 892
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-16