PHP code example of molay76 / laravel-mysql2plantuml

1. Go to this page and download the library: Download molay76/laravel-mysql2plantuml library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

molay76 / laravel-mysql2plantuml example snippets


php artisan dump:mysql2puml

php artisan vendor:publish --provider=Mysql2PlantUml\Mysql2PlantUmlServiceProvider

@startuml
skinparam {
defaultFontName Monospaced
}
left to right direction
package dacapo_sample {
entity "migrations" as migrations {
    + id       [PK]              int(10) unsigned  not null 
      migration                  varchar(255)      not null 
      batch                      int(11)           not null 
}
entity "tags" as tags {
    + id   [PK]              bigint(20) unsigned  not null 
      title                  varchar(255)         not null 
}
entity "task_tag" as task_tag {
    # task_id    [FK]    [MUL] bigint(20) unsigned  not null 
    # tag_id     [FK]    [MUL] bigint(20) unsigned  not null 
}
entity "tasks" as tasks {
    + id     [PK]              bigint(20) unsigned  not null 
    # user_id    [FK][UK]      bigint(20) unsigned  not null 
      content                  varchar(255)         not null 
}
entity "users" as users {
    + id  [PK]              bigint(20) unsigned  not null 
      name                  varchar(255)         not null 
}
}

task_tag }o-- tasks
task_tag }o-- tags
tasks }o-- users
@enduml