PHPackages                             adiwit-co-th/laravel-er-diagram-generator - 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. adiwit-co-th/laravel-er-diagram-generator

Abandoned → [https://github.com/adiwitcoth/laravel-er-diagram-generator](/?search=https%3A%2F%2Fgithub.com%2Fadiwitcoth%2Flaravel-er-diagram-generator)Library

adiwit-co-th/laravel-er-diagram-generator
=========================================

Generate ER diagrams from your Laravel models.

1.5.0(5y ago)0388MITPHPPHP ^7.1

Since Jul 3Pushed 4y agoCompare

[ Source](https://github.com/adiwitcoth/laravel-er-diagram-generator)[ Packagist](https://packagist.org/packages/adiwit-co-th/laravel-er-diagram-generator)[ Docs](https://github.com/beyondcode/laravel-er-diagram-generator)[ RSS](/packages/adiwit-co-th-laravel-er-diagram-generator/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (15)Used By (0)

Laravel ER Diagram Generator
============================

[](#laravel-er-diagram-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b4131b70cd90a610a566da7c5c3727367445a3bcb5db95e9ab5fc893b17d3d55/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6265796f6e64636f64652f6c61726176656c2d65722d6469616772616d2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/beyondcode/laravel-er-diagram-generator)[![Build Status](https://camo.githubusercontent.com/a00987e36df9dc78676d62c2501bdc0287966c5cdc5b48dbec8febc1079b61ad/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6265796f6e64636f64652f6c61726176656c2d65722d6469616772616d2d67656e657261746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/beyondcode/laravel-er-diagram-generator)[![Quality Score](https://camo.githubusercontent.com/7d7578daebf324b1d23be035733ccc0ebe66fde22347fd16dfa8324eac71c801/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6265796f6e64636f64652f6c61726176656c2d65722d6469616772616d2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/beyondcode/laravel-er-diagram-generator)[![Total Downloads](https://camo.githubusercontent.com/e354c5896a40b528a61489a83de2e877f3bd941f49ca89993b18ecf276d51c4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6265796f6e64636f64652f6c61726176656c2d65722d6469616772616d2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/beyondcode/laravel-er-diagram-generator)

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](https://www.graphviz.org) 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](https://phppackagedevelopment.com) video course.

Prerequisites
-------------

[](#prerequisites)

The minimum required PHP version is 7.1.0.

Requirements
------------

[](#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](https://graphviz.gitlab.io/_pages/Download/Download_windows.html).

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

[](#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
-----

[](#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
-------------------

[](#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](https://www.graphviz.org/doc/info/output.html), like SVG:

```
php artisan generate:erd output.svg --format=svg
```

Customization
-------------

[](#customization)

Please take a look at the published `erd-generator.php` configuration file for all available customization options.

Examples
--------

[](#examples)

Here are some examples taken from the [Laravel.io](https://laravel.io) codebase.

[![Using Database Schema](https://camo.githubusercontent.com/f031f555abbcc3e745f74b9a7f77e1ea6972103fe6ac52f838c40cbdcb6c5d1a/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f6572642d67656e657261746f722f736368656d612e706e67)](https://camo.githubusercontent.com/f031f555abbcc3e745f74b9a7f77e1ea6972103fe6ac52f838c40cbdcb6c5d1a/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f6572642d67656e657261746f722f736368656d612e706e67)

[![Customized](https://camo.githubusercontent.com/dbbc243b54022f30a5eebd726e513c55cdd721f3ec8fcd193d9fb6f94851de56/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f6572642d67656e657261746f722f637573746f6d697a65642e706e67)](https://camo.githubusercontent.com/dbbc243b54022f30a5eebd726e513c55cdd721f3ec8fcd193d9fb6f94851de56/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f6572642d67656e657261746f722f637573746f6d697a65642e706e67)

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Marcel Pociot](https://github.com/mpociot)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 58.5% 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

Every ~63 days

Recently: every ~187 days

Total

14

Last Release

2042d ago

Major Versions

0.2.3 → 1.0.02018-07-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/93be73fed3edf96349bbd2ce26887a89e1f0fb6b33d24f15ef4533e64f983069?d=identicon)[adiwitcoth](/maintainers/adiwitcoth)

---

Top Contributors

[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (31 commits)")[![diogogomeswww](https://avatars.githubusercontent.com/u/11543163?v=4)](https://github.com/diogogomeswww "diogogomeswww (5 commits)")[![PopMishima](https://avatars.githubusercontent.com/u/5652966?v=4)](https://github.com/PopMishima "PopMishima (2 commits)")[![daniel-werner](https://avatars.githubusercontent.com/u/38726367?v=4)](https://github.com/daniel-werner "daniel-werner (2 commits)")[![ThibaudDauce](https://avatars.githubusercontent.com/u/1770543?v=4)](https://github.com/ThibaudDauce "ThibaudDauce (2 commits)")[![adiwit-co-th](https://avatars.githubusercontent.com/u/50860673?v=4)](https://github.com/adiwit-co-th "adiwit-co-th (2 commits)")[![pascalbaljet](https://avatars.githubusercontent.com/u/8403149?v=4)](https://github.com/pascalbaljet "pascalbaljet (1 commits)")[![rdarcy1](https://avatars.githubusercontent.com/u/15962421?v=4)](https://github.com/rdarcy1 "rdarcy1 (1 commits)")[![simondavies](https://avatars.githubusercontent.com/u/689184?v=4)](https://github.com/simondavies "simondavies (1 commits)")[![Yahav](https://avatars.githubusercontent.com/u/113236?v=4)](https://github.com/Yahav "Yahav (1 commits)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (1 commits)")[![eiko03](https://avatars.githubusercontent.com/u/23137164?v=4)](https://github.com/eiko03 "eiko03 (1 commits)")[![henryavila](https://avatars.githubusercontent.com/u/8429941?v=4)](https://github.com/henryavila "henryavila (1 commits)")[![iforwms](https://avatars.githubusercontent.com/u/10304616?v=4)](https://github.com/iforwms "iforwms (1 commits)")[![joe-pritchard](https://avatars.githubusercontent.com/u/25373032?v=4)](https://github.com/joe-pritchard "joe-pritchard (1 commits)")

---

Tags

beyondcodelaravel-er-diagram-generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adiwit-co-th-laravel-er-diagram-generator/health.svg)

```
[![Health](https://phpackages.com/badges/adiwit-co-th-laravel-er-diagram-generator/health.svg)](https://phpackages.com/packages/adiwit-co-th-laravel-er-diagram-generator)
```

###  Alternatives

[beyondcode/laravel-er-diagram-generator

Generate ER diagrams from your Laravel models.

2.0k1.4M2](/packages/beyondcode-laravel-er-diagram-generator)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[beyondcode/laravel-masked-db-dump

Dump masked information from your database

11341.2k](/packages/beyondcode-laravel-masked-db-dump)[psx/sql

Generate type-safe PHP classes from your database

1773.4k4](/packages/psx-sql)

PHPackages © 2026

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