PHPackages                             mtolhuys/laravel-schematics - 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. [Database &amp; ORM](/categories/database)
4. /
5. mtolhuys/laravel-schematics

ActiveLibrary[Database &amp; ORM](/categories/database)

mtolhuys/laravel-schematics
===========================

A interface to help you build your models

0.10.3(6y ago)1.5k84.3k↓27.8%133[10 PRs](https://github.com/mtolhuys/laravel-schematics/pulls)1MITVuePHP ^7.0

Since Jan 23Pushed 3y ago31 watchersCompare

[ Source](https://github.com/mtolhuys/laravel-schematics)[ Packagist](https://packagist.org/packages/mtolhuys/laravel-schematics)[ Docs](https://github.com/mtolhuys/laravel-schematics)[ RSS](/packages/mtolhuys-laravel-schematics/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (53)Used By (1)

 [![](resources/images/icons/icon.png)](resources/images/icons/icon.png) Laravel Schematics
============================================================================================

[](#--------laravel-schematics)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e9f28acb7b3608edc0d85fd89eefa5f29468e04c71c56c4d48cb62c0a9e31036/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d746f6c687579732f6c61726176656c2d736368656d61746963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mtolhuys/laravel-schematics)[![Build Status](https://camo.githubusercontent.com/4564bab24aeb7a9b0530c6bab7506926a60c1789c8e2873d45f33d58d5c9cccc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d746f6c687579732f6c61726176656c2d736368656d61746963732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mtolhuys/laravel-schematics)[![Quality Score](https://camo.githubusercontent.com/571e9838cc3f32442551965427f7e4e648318b65503b8c3534cc7c535a3fd3e2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d746f6c687579732f6c61726176656c2d736368656d61746963732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mtolhuys/laravel-schematics)[![Total Downloads](https://camo.githubusercontent.com/3d3e8d3605ddd09ae2590954af2c7d7a101b80ccb7271210d98fc02b8a42405f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d746f6c687579732f6c61726176656c2d736368656d61746963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mtolhuys/laravel-schematics)

This package allows you to make multiple **diagrams** of your Eloquent **models** and their **relations**. It will help building them providing drag and drop relations, forms to **create** and **edit** your models and many options like adding **resource controllers**, **form requests** and running **migrations** by the click of a button or (configurable) automatically. It also will give you insights in the migrations you ran and the ones specified in your migrations folder.

[![Schematics Example](resources/images/readme/intro.png)](resources/images/readme/intro.png)

Its aim is to help you (and your team) get more grip on the models from a code perspective, the status of your migrations and build / edit them faster.

---

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

[](#installation)

You can install the package via composer:

```
composer require mtolhuys/laravel-schematics --dev
```

Run `php artisan schematics:install` which will do the route caching, create vendor assets in your public folder and setup the configuration file.

Or...

```
php artisan vendor:publish --provider="Mtolhuys\LaravelSchematics\LaravelSchematicsServiceProvider"
```

and visit `{your-app}/schematics`

---

Usage
-----

[](#usage)

#### Starting out / Searching

[](#starting-out--searching)

If you already have a lot of models I recommend you use the search bar to narrow down the diagrams into specific sections f.e:

[![Schematics Example](resources/images/readme/search-example.png)](resources/images/readme/search-example.png)

These searches are saved across your diagrams.

[![](resources/images/readme/search-example.gif)](resources/images/readme/search-example.gif)

#### Relations

[](#relations)

When you drag and drop the arrow to another model you'll get a form to specify the relation you want to build f.e:

[![](resources/images/readme/relation-example.gif)](resources/images/readme/relation-example.gif)

Clicking on them will show something like:

[![Relation Example](resources/images/readme/relation-example.png)](resources/images/readme/relation-example.png)

#### Building / Editing Models

[](#building--editing-models)

To specify the types of your columns I've chosen the form request rule syntax. To see what's available you can click the little help icon below the fields in the model form:

[![Fields Explanation](resources/images/readme/fields-explanation.png)](resources/images/readme/fields-explanation.png)

The package is flexible enough to differentiate between renaming and changing column types. It will create migrations according the need to change or create a table and setup your `$fillables`. I do **strongly** suggest you check the migrations before running them if the stakes are high.

You don't have to worry about existing migrations though, the package will only look for migrations it created itself by checking the value of the `@tag` in the comment it adds. It looks like this:

```
/**
 * Laravel Schematics
 *
 * WARNING: removing @tag value will disable automated removal
 *
 * @package Laravel-schematics
 * @author  Maarten Tolhuijs
 * @url     https://github.com/mtolhuys/laravel-schematics
 * @tag     laravel-schematics-foobar-model
 */
```

#### Changing Diagram Style

[](#changing-diagram-style)

There are 4 diagram styles. Bezier, Straight, Flowchart and State Machine:

[![](resources/images/readme/styles-example.gif)](resources/images/readme/styles-example.gif)

#### Importing / Exporting Diagrams

[](#importing--exporting-diagrams)

To save and / or share the diagrams you created you can use the export and import settings feature:

[![](resources/images/readme/export-import-example.gif)](resources/images/readme/export-import-example.gif)

---

### Testing

[](#testing)

You can run the tests with:

```
composer test
```

Or, optionally, with coverage information:

```
composer test-coverage
```

### Changelog

[](#changelog)

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

Credits
-------

[](#credits)

This package is possible because of the effort and time of these people! ✨

   [ ![](https://avatars1.githubusercontent.com/u/10849136?s=400&v=4)
 **Maarten Tolhuijs** ](https://github.com/mtolhuys)
 Creator️   [ ![](https://avatars0.githubusercontent.com/u/16704769?s=400&v=4)
 **Deisi Tolhuijs** ](https://github.com/dtolhuijs)
 Design
   [ ![](https://avatars0.githubusercontent.com/u/22258295?s=400&v=4)
 **Dennis Mwea** ](https://github.com/Dennis-Mwea)
 Contributor
   [ ![](https://avatars3.githubusercontent.com/u/4398301?s=400&v=4)
 **Robbin Schepers** ](https://github.com/Roboroads)
 Contributor
   [ ![](https://avatars1.githubusercontent.com/u/26224522?s=400&v=4)
 **Bram van Rijswijk** ](https://github.com/bramvanrijswijk)
 Support
   [ ![](https://avatars2.githubusercontent.com/u/7912315?s=400&v=4)
 **Lucas Snel** ](https://github.com/elbojoloco)
 Contributor
  Contributing
------------

[](#contributing)

Since I'm getting some questions about this I want these things to be perfectly clear:

- This is a **safe** haven for contributions, every (positive) contributon matters!
- You are free (and encouraged) to use **anything** of this package for your own ideas.
- You can **always** ask for help or email me directly for any questions.

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

### Security

[](#security)

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

License
-------

[](#license)

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

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity56

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.6% 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 ~1 days

Total

43

Last Release

2249d ago

PHP version history (2 changes)v0.1PHP ^7.0

0.7.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f86a601f247298c0f4beb73d0fd47aca41551ad230c4a0ff9cdab56ddc0d55f?d=identicon)[mtolhuijs](/maintainers/mtolhuijs)

---

Top Contributors

[![mtolhuys](https://avatars.githubusercontent.com/u/10849136?v=4)](https://github.com/mtolhuys "mtolhuys (168 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![Dennis-Mwea](https://avatars.githubusercontent.com/u/22258295?v=4)](https://github.com/Dennis-Mwea "Dennis-Mwea (4 commits)")[![rpouls](https://avatars.githubusercontent.com/u/2946593?v=4)](https://github.com/rpouls "rpouls (2 commits)")[![elbojoloco](https://avatars.githubusercontent.com/u/7912315?v=4)](https://github.com/elbojoloco "elbojoloco (2 commits)")[![micksp](https://avatars.githubusercontent.com/u/4571252?v=4)](https://github.com/micksp "micksp (1 commits)")[![LeMatosDeFuk](https://avatars.githubusercontent.com/u/45625770?v=4)](https://github.com/LeMatosDeFuk "LeMatosDeFuk (1 commits)")[![phpcxy](https://avatars.githubusercontent.com/u/1515074?v=4)](https://github.com/phpcxy "phpcxy (1 commits)")[![imanghafoori1](https://avatars.githubusercontent.com/u/6961695?v=4)](https://github.com/imanghafoori1 "imanghafoori1 (1 commits)")

---

Tags

diagramsdragdropexplanationlaravelschematicslaravelschemaeloquentmodelsdiagrammtolhuyslaravel-schematicsschematics

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mtolhuys-laravel-schematics/health.svg)

```
[![Health](https://phpackages.com/badges/mtolhuys-laravel-schematics/health.svg)](https://phpackages.com/packages/mtolhuys-laravel-schematics)
```

###  Alternatives

[mopo922/laravel-treats

A collection of goodies for Laravel 5.

108451.6k1](/packages/mopo922-laravel-treats)[devio/eavquent

EAV modeling package for Eloquent and Laravel.

6410.4k](/packages/devio-eavquent)[pursehouse/modeler-laravel-eloquent

Generate model classes for Eloquent in Laravel

112.4k](/packages/pursehouse-modeler-laravel-eloquent)

PHPackages © 2026

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