Download the PHP package brianpando/plantumlgen without Composer
On this page you can find all versions of the php package brianpando/plantumlgen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download brianpando/plantumlgen
More information about brianpando/plantumlgen
Files in brianpando/plantumlgen
Package plantumlgen
Short Description package for code generate by plantUml Tool
License proprietary
Informations about the package plantumlgen
plantUmlGen
:package: This is a first version of Laravel package to auto generate new models and migrations from PlantUml file.
Install
How to Use
you need have the Plantuml plain file (plantuml.pu) in root project, this file must be contains the class diagram with a namespace models. For learn how to write a class diagram please visit http://plantuml.com/es/class-diagram.
you can write your diagram using online editor https://www.planttext.com.
This is an class diagram example:
Now, you can create the models or the migration file using the new commands:
for models
This create a models folder in your folder app/, then create each class like a model eloquent including the relationship. please be careful linking with the right relationship in your diagram.
for migration file
=> You should have a database created.
this create a migration file in you migrations folder with the name [yyy-mm-dd_HHMMSS]_[create|update]_[classname].php
, then you can run the migration with php artisan migrate
. that is all :heavy_exclamation_mark:.
:pushpin: if you need, this package get the plantuml.jar who create a png diagram file, for use it, you must be in root project and execute:
this create a png file of diagram class.
for controllers
This create the controller in your app/controllers folder, for this you should create in classes using controller namespace in your class diagram. If controller exists, it only add new methods.
If you are using Visual Studio Code
Exist a extension for plantUML please Launch VS Code Quick Open (Ctrl + P) and type ext install plantuml
, then install PlantUml ext. if you are using the local file plantuml.jar please you must have installed Java and Graphviz, for generate preview screen in VS. for example in Mac brew install graphviz
.
Testing
Exist a couple of PHpUnit components, for using in package vendor/bin/phpunit tests/CreateControllersTest.php
Next
In next versions the package will generate another layers of your code using the class or package diagram from PlantUML.