Skip to content
A Laravel package making a diagram of your models, relations and the ability to build them with it
Vue PHP JavaScript HTML
Branch: master
Clone or download

Latest commit

mtolhuys Merge pull request #38 from rpouls/patch-1
Fixed exception when creating a resource controller
Latest commit c69a2e8 Mar 21, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
config Match model path with namespace Mar 12, 2020
dist Removed tab adding field, fixed undefined model namespace in form header Mar 11, 2020
resources Removed tab adding field, fixed undefined model namespace in form header Mar 11, 2020
src To make it more clear, use the full option Mar 19, 2020
tests Add support for custom path model creation Mar 12, 2020
.editorconfig initial WIP repository creation Jan 20, 2020
.gitattributes initial WIP repository creation Jan 20, 2020
.gitignore initial WIP repository creation Jan 20, 2020
.scrutinizer.yml initial WIP repository creation Jan 20, 2020
.styleci.yml initial WIP repository creation Jan 20, 2020
.travis.yml Refactoring, adding tests and ipAddress Feb 22, 2020 Update Mar 10, 2020 initial WIP repository creation Jan 20, 2020 initial WIP repository creation Jan 20, 2020 Add Deisi for icon and design choices Mar 11, 2020
composer.json Catch route caching with closure exceptions during install Mar 10, 2020
composer.lock Add mappers and relations writing unit tests Feb 19, 2020
package-lock.json Bump acorn from 6.4.0 to 6.4.1 Mar 15, 2020
package.json Update package.json Mar 7, 2020
tailwind.config.js Switched to webpack.mix.js and compiled assets Feb 24, 2020

Laravel Schematics

Latest Version on Packagist Build Status Quality Score Total Downloads

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

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.


You can install the package via composer:

composer require mtolhuys/laravel-schematics

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


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

and visit {your-app}/schematics

Make sure the routes are cached!


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

These searches are saved across your diagrams.


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:

Clicking on them will show something like:

Relation Example

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

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
 * @tag     laravel-schematics-foobar-model

Changing Diagram Style

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

Importing / Exporting Diagrams

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


You can run the tests with:

composer test

Or, optionally, with coverage information:

composer test-coverage


Please see CHANGELOG for more information what has changed recently.


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

Maarten Tolhuijs


Deisi Tolhuijs


Robbin Schepers


Bram van Rijswijk


Lucas Snel



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 for further details.


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


The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.