mtolhuys / laravel-schematics
A interface to help you build your models
Installs: 67 780
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1 494
Watchers: 32
Forks: 133
Open Issues: 29
Language:Vue
Requires
- php: ^7.0
Requires (Dev)
- doctrine/dbal: ^2.0
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
- dev-master
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.12
- 0.9.11
- 0.9.10
- 0.9.9
- 0.9.8
- 0.9.7
- 0.9.6
- 0.9.5
- 0.9.4
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- v0.2.1
- v0.2.0
- 0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1
- dev-dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/loader-utils-and-webpack-cli-and-resolve-url-loader-1.4.2
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-develop
This package is auto-updated.
Last update: 2024-10-30 01:33:20 UTC
README
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.
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
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
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:
These searches are saved across your diagrams.
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:
Clicking on them will show something like:
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:
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 <mtolhuys@protonmail.com> * @url https://github.com/mtolhuys/laravel-schematics * @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:
Testing
You can run the tests with:
composer test
Or, optionally, with coverage information:
composer test-coverage
Changelog
Please see CHANGELOG for more information what has changed recently.
Credits
This package is possible because of the effort and time of these people! ✨
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 for further details.
Security
If you discover any security related issues, please email mtolhuys@protonmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.