承接 dgtlss/easyerd 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dgtlss/easyerd

Composer 安装命令:

composer require dgtlss/easyerd

包简介

A Laravel package to generate ERD diagrams from models and migrations

README 文档

README

A Laravel package to generate ERD (Entity Relationship Diagram) diagrams from your models and migrations.

Features

  • Generate ERD diagrams from Laravel models and migrations
  • Output in multiple formats (PDF, PNG, SVG, JPG)
  • Text-based ERD representation
  • Configurable table styles and relationships
  • Exclude specific tables from diagrams
  • Customizable output paths
  • Dark mode support
  • High-resolution image settings
  • Grid-friendly layout options

Installation

composer require dgtlss/easyerd

Usage

Generate ERD

php artisan easyerd:generate

Options

  • --type: Type of ERD to generate (image, text, both) - Default: both
  • --output: Custom output path for the ERD files
  • --format: Image format (pdf, png, svg, jpg) - Default: pdf

Examples

# Generate both image and text ERD
php artisan easyerd:generate

# Generate only image ERD in SVG format
php artisan easyerd:generate --type=image --format=svg

# Generate only image ERD in PDF format
php artisan easyerd:generate --type=image --format=pdf

# Generate only text ERD with custom output path
php artisan easyerd:generate --type=text --output=/path/to/output

# Generate ERD with custom output and format
php artisan easyerd:generate --output=/custom/path --format=jpg

# Generate ERD in PDF format with high resolution
php artisan easyerd:generate --format=pdf

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="Dgtlss\EasyErd\EasyErdServiceProvider"

This will create config/easyerd.php with the following options:

return [
    'output_path' => storage_path('app/erd'),
    
    'image_format' => 'pdf',
    
    'include_models' => true,
    
    'include_migrations' => true,
    
    'graphviz_path' => 'dot',
    
    'orthogonal_splines' => false,
    
    'grid_splines' => 'spline', // Grid-friendly curves
    
    'dark_mode' => false,
    
    // New high-resolution settings
    'image_width' => 4000,
    
    'image_height' => 3000,
    
    'dpi' => 600,
    
    'font_size' => 11, // Slightly smaller for grid
    
    'nodesep' => 3.0, // Wider spacing for grid
    
    'ranksep' => 2.8, // Compact vertical for grid,
    
    'table_styles' => [
        'primary_key' => 'bgcolor="lightyellow"',
        'foreign_key' => 'bgcolor="lightpink"',
        'regular_column' => '',
    ],
    
    'dark_table_styles' => [
        'primary_key' => 'bgcolor="#2d3748"',
        'foreign_key' => 'bgcolor="#4a5568"',
        'regular_column' => '',
        'header_bg' => 'bgcolor="#1a202c"',
        'header_text' => 'color="white"',
        'cell_bg' => 'bgcolor="#2d3748"',
        'cell_text' => 'color="white"',
        'border' => 'color="#4a5568"',
    ],
    
    'excluded_tables' => [
        //
    ],
    
    'relationship_types' => [
        'belongs_to' => '->',
        'has_many' => '<-',
        'has_one' => '<-',
        'belongs_to_many' => '<->',
    ],
];

Requirements

  • PHP 8.3+
  • Laravel 11.0 or 12.0
  • Graphviz (for image generation)

Installing Graphviz

macOS:

brew install graphviz

Ubuntu/Debian:

sudo apt-get install graphviz

Windows: Download from Graphviz official website

dgtlss/easyerd 适用场景与选型建议

dgtlss/easyerd 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 143 次下载、GitHub Stars 达 6, 最近一次更新时间为 2025 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「generator」 「package」 「laravel」 「erd」 「diagram」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dgtlss/easyerd 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dgtlss/easyerd 我们能提供哪些服务?
定制开发 / 二次开发

基于 dgtlss/easyerd 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 143
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 27
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-10