• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

beyondcode/laravel-er-diagram-generator: Generate entity relation diagrams from ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

beyondcode/laravel-er-diagram-generator

开源软件地址(OpenSource Url):

https://github.com/beyondcode/laravel-er-diagram-generator

开源编程语言(OpenSource Language):

PHP 100.0%

开源软件介绍(OpenSource Introduction):

Laravel ER Diagram Generator

Latest Version on Packagist Build Status Quality Score Total Downloads

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.

Using Database Schema

Customized

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
pipe-dream/laravel-create: Create Laravel projects really fast发布时间:2022-07-07
下一篇:
cknow/laravel-money: Laravel Money.发布时间:2022-07-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap