PHPackages                             g4t/schema-designer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. g4t/schema-designer

ActiveLibrary

g4t/schema-designer
===================

Visual database schema designer for Laravel — renders your schema from migration files as an interactive ERD and generates migrations for every change made in the UI.

0.0.1(today)03↑2900%1MITPHPPHP ^8.0

Since Jul 27Pushed todayCompare

[ Source](https://github.com/hussein4alaa/schema-designer)[ Packagist](https://packagist.org/packages/g4t/schema-designer)[ RSS](/packages/g4t-schema-designer/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (1)

 [![g4t Schema Designer — draw your database on a canvas, ship real Laravel migrations](art/cover.svg)](art/cover.svg)

 [![Packagist](https://camo.githubusercontent.com/eb950760ad5177e2d20c47d9ce408a0d9864c0582565c75b377e441d592f1352/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d673474253246736368656d612d2d64657369676e65722d3466386366663f7374796c653d666c61742d737175617265)](https://packagist.org/packages/g4t/schema-designer) [![Laravel 8 to 13](https://camo.githubusercontent.com/6cb9cbe166ae13de21bd2f8f6efec34ad17ef66a139187fd41dbb5c4a8c8793e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d38253230e2869225323031332d6666326432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://camo.githubusercontent.com/6cb9cbe166ae13de21bd2f8f6efec34ad17ef66a139187fd41dbb5c4a8c8793e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d38253230e2869225323031332d6666326432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c) [![PHP ^8.0](https://camo.githubusercontent.com/54a1e5f49a45a94bb3bc9b3c95239441c0f84ca39b24b8917cf51c5c6c5cde0f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d3737376262343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://camo.githubusercontent.com/54a1e5f49a45a94bb3bc9b3c95239441c0f84ca39b24b8917cf51c5c6c5cde0f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d3737376262343f7374796c653d666c61742d737175617265266c6f676f3d706870) [![MIT](https://camo.githubusercontent.com/fb7e27999c1c702085a6a2e0378d9c6fbb085370a17ae8b61b6fef98a65a5e1f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3265636338663f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/fb7e27999c1c702085a6a2e0378d9c6fbb085370a17ae8b61b6fef98a65a5e1f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3265636338663f7374796c653d666c61742d737175617265)

g4t Schema Designer
===================

[](#g4t-schema-designer)

A visual database schema designer for Laravel, driven entirely by **migration files** — no database introspection required.

The package replays every migration's `up()` method against a *capturing* schema builder swapped in behind the `Schema` facade. Blueprints are recorded instead of executed and folded into an in-memory model of your final schema — rendered as an interactive ERD. Every change you make in the UI (create / edit / drop a table) generates a real migration file, shown to you for review before it is written.

 [![How it works: migration files → blueprint capture → interactive ERD → generated migrations](art/how-it-works.svg)](art/how-it-works.svg)

Installation
------------

[](#installation)

```
composer require g4t/schema-designer
```

The service provider is auto-discovered. Open the designer at:

```
http://your-app.test/schema-designer

```

Features
--------

[](#features)

- **ERD canvas** — tables as draggable cards, foreign keys as curved colored edges, pan/zoom, auto-layout, fit-to-view, and a live filter. Card positions persist across sessions.
- **Create tables** — column editor with all common Blueprint types, length/precision/enum values, nullable/unsigned/default/`useCurrent` modifiers, composite indexes, and foreign keys with `onDelete`/`onUpdate`. Quick-add buttons for `id`, `uuid`, `timestamps`, and soft deletes.
- **Edit tables** — the designer diffs your changes against the parsed schema and generates an update migration: `renameColumn`, `->change()`, `dropColumn`, index and FK adds/drops — ordered correctly (FK/index drops before column drops) with a best-effort `down()`.
- **Drop tables** — generates a `dropIfExists` migration whose `down()` fully recreates the table from the current parsed definition.
- **Migration awareness** — tables whose source migrations haven't run yet get a *pending* badge, and you can run `php artisan migrate` right from the UI.
- **Safe parsing** — raw `DB::statement()` / query-builder calls inside migrations run in the connection's *pretend* mode, so parsing never touches your database. Files that fail to parse are surfaced as warnings, never fatal.

Compatibility
-------------

[](#compatibility)

**Laravel**8.x, 9.x, 10.x, 11.x, 12.x, 13.x**PHP**^8.0**Databases**Driver-agnostic — parsing happens at the Blueprint level, so MySQL, PostgreSQL, SQLite, and SQL Server projects all work the same.Configuration
-------------

[](#configuration)

```
php artisan vendor:publish --tag=schema-designer-config
```

KeyDefaultPurpose`enabled``null``null` → available everywhere **except production**. Override with `SCHEMA_DESIGNER_ENABLED=true/false`.`path``schema-designer`Route prefix.`middleware``['web']`Add `auth` etc. to protect the UI.`migrations_path``database_path('migrations')`Where migrations are read from and written to.`layout_file``storage/app/schema-designer/layout.json`Canvas positions.How parsing works
-----------------

[](#how-parsing-works)

1. Migration files are loaded in order (both anonymous-class and classic named-class styles).
2. The `Schema` facade root is swapped for a `CapturingSchemaBuilder`; each `Schema::create/table/drop/rename` call produces a Blueprint that is **recorded, not executed**.
3. Introspection calls inside migrations (`Schema::hasTable()`, `hasColumn()`, …) are answered from the aggregated state, so conditional migrations behave exactly as they would against a fully migrated database.
4. `SchemaAggregator` folds columns, `->change()`s, renames, drops, indexes, and foreign keys into the final schema model.

### Known limits

[](#known-limits)

- Raw SQL (`DB::statement('ALTER TABLE …')`) can't be interpreted structurally — the statement is safely ignored and the file is listed under parse warnings when it affects schema.
- `Schema::connection('other')->…` calls bypass the capture and are not represented.
- Generated `down()` methods for edits are best-effort reconstructions.

Security
--------

[](#security)

The UI writes files into your migrations directory and can run `php artisan migrate`. It is disabled in production by default — if you enable it there, put real auth middleware in front of it.

License
-------

[](#license)

MIT

schema-designer
===============

[](#schema-designer)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7b7c2556272b7d41b2b756e7791f812c3a22b8ab34fa69d47ae1d8806b67cb6?d=identicon)[hussein4alaa](/maintainers/hussein4alaa)

---

Top Contributors

[![hussein4alaa](https://avatars.githubusercontent.com/u/13614747?v=4)](https://github.com/hussein4alaa "hussein4alaa (3 commits)")

---

Tags

laravelschemamigrationsdesignererd

### Embed Badge

![Health badge](/badges/g4t-schema-designer/health.svg)

```
[![Health](https://phpackages.com/badges/g4t-schema-designer/health.svg)](https://phpackages.com/packages/g4t-schema-designer)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[umbrellio/laravel-pg-extensions

Extensions for Postgres Laravel

102451.2k1](/packages/umbrellio-laravel-pg-extensions)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3518.3k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
