承接 bugo/filament-er-diagram 相关项目开发

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

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

bugo/filament-er-diagram

最新稳定版本:0.2

Composer 安装命令:

composer require bugo/filament-er-diagram

包简介

Live ER diagram panel for FilamentPHP 5 — auto-detects Eloquent models and relationships

README 文档

README

PHP Coverage Status

A Filament 5 plugin that generates a live, interactive ER diagram directly inside your admin panel. It auto-discovers all Eloquent models in a given directory, reads their database columns via Schema, detects relationships via Reflection, and renders an interactive force-directed graph powered by D3.js.

Image

Features

  • 🔍 Auto-discovers Eloquent models — no configuration needed for basic use
  • 🔗 Detects hasMany, hasOne, belongsTo, belongsToMany, morphMany, morphOne and Through variants
  • 🏷️ Shows table name, column names, types, PK and FK badges
  • 🖱️ Draggable nodes, pan & zoom, click-to-highlight connected models
  • 🔎 Real-time model search
  • 💾 One-click export to SVG or PNG
  • 🌙 Full dark mode support
  • ⚙️ Fully configurable via fluent plugin API

Installation

composer require bugo/filament-er-diagram

Requires a custom Filament theme. Add the plugin's views to your theme's CSS source:

@source '../../../../vendor/bugo/filament-er-diagram/resources/**/*.blade.php';

Publish the config (optional):

php artisan vendor:publish --tag="filament-er-diagram-config"

Build the JS assets:

php artisan filament:assets

Usage

Register the plugin in your AdminPanelProvider:

use Bugo\FilamentErDiagram\ErDiagramPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            ErDiagramPlugin::make(),
        ]);
}

The panel now has an ER Diagram page under the Tools navigation group.

Customisation

ErDiagramPlugin::make()
    ->modelsPath('app/Domain/Models')          // custom directory
    ->excludeModels([PersonalAccessToken::class])
    ->withoutColumns()                          // hide column details
    ->withoutRelationshipLabels()               // hide edge labels
    ->navigationGroup('Developer')
    ->navigationSort(10)
    ->navigationIcon('heroicon-o-table-cells'),

Artisan command

# Print a table summary
php artisan er-diagram:generate --path=app/Models

# Print clean JSON to stdout
php artisan er-diagram:generate --format=json --path=app/Models

# Save JSON to file
php artisan er-diagram:generate --format=json --output=er-diagram.json

# Exclude specific models
php artisan er-diagram:generate --exclude=App\\Models\\PersonalAccessToken

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固