PHPackages                             reallyli/laravel-module-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. reallyli/laravel-module-er-diagram-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

reallyli/laravel-module-er-diagram-generator
============================================

Generate ER diagrams from your Laravel models.

1.5.0(6y ago)0171MITPHPPHP ^7.1

Since Jul 3Pushed 6y agoCompare

[ Source](https://github.com/reallyli/laravel-er-diagram-generator)[ Packagist](https://packagist.org/packages/reallyli/laravel-module-er-diagram-generator)[ Docs](https://github.com/beyondcode/laravel-er-diagram-generator)[ RSS](/packages/reallyli-laravel-module-er-diagram-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (16)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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 63% 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 ~41 days

Recently: every ~115 days

Total

14

Last Release

2332d ago

Major Versions

0.2.3 → 1.0.02018-07-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b5243dfc642d12f1e56f6c4c0e4e7200037029ab22c6122a92756810d15176b?d=identicon)[reallyli](/maintainers/reallyli)

---

Top Contributors

[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (29 commits)")[![diogogomeswww](https://avatars.githubusercontent.com/u/11543163?v=4)](https://github.com/diogogomeswww "diogogomeswww (5 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)")[![henryavila](https://avatars.githubusercontent.com/u/8429941?v=4)](https://github.com/henryavila "henryavila (1 commits)")[![joe-pritchard](https://avatars.githubusercontent.com/u/25373032?v=4)](https://github.com/joe-pritchard "joe-pritchard (1 commits)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (1 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)")[![geekjourneyx](https://avatars.githubusercontent.com/u/24422856?v=4)](https://github.com/geekjourneyx "geekjourneyx (1 commits)")

---

Tags

beyondcodelaravel-er-diagram-generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/reallyli-laravel-module-er-diagram-generator/health.svg)

```
[![Health](https://phpackages.com/badges/reallyli-laravel-module-er-diagram-generator/health.svg)](https://phpackages.com/packages/reallyli-laravel-module-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)[blair2004/nexopos

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

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

Add comments to your Laravel application

605414.2k2](/packages/beyondcode-laravel-comments)[beyondcode/laravel-vouchers

Allow users to redeem vouchers that are bound to models..

70763.4k2](/packages/beyondcode-laravel-vouchers)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[beyondcode/tinkerwell

Drivers, panels and tools for customizing Tinkerwell to your application.

4313.7k2](/packages/beyondcode-tinkerwell)

PHPackages © 2026

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