Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 118 | All time: 9,534 This week: 455![]() |
Version | License | PHP version | Categories | |||
db-draw 1.0.0 | Custom (specified... | 5 | PHP 5, Graphics, Tools |
Generate an ER diagram from your existing database.
Because DB Draw is a library, you have to use it as a dependency and instantiate it in your project.
In order to create a diagram you have to follow these steps:
Example:
use Doctrine\DBAL\DriverManager;
use Jawira\DbDraw\DbDraw;
use Jawira\PlantUmlClient\{Client, Format};
// a. Some logic to retrieve $connection (\Doctrine\DBAL\Connection)
$connectionParams = ['url' => 'mysql://admin:pass1234@127.0.0.1/db-draw',
'driver' => 'pdo_mysql'];
$connection = DriverManager::getConnection($connectionParams);
// b. Generating PlantUML diagram
$dbDiagram = new DbDraw($connection);
$puml = $dbDiagram->generatePuml(DbDraw::MIDI);
file_put_contents('database.puml', $puml);
// c. Converting & saving png image
$client = new Client();
$png = $client->generateImage($puml, Format::PNG);
file_put_contents('database.png', $png);
$dbDraw = new DbDraw($connection);
$mini = $dbDraw->generatePuml(DbDraw::MINI); // only table names
$midi = $dbDraw->generatePuml(DbDraw::MIDI); // like mini with columns
$maxi = $dbDraw->generatePuml(DbDraw::MAXI); // like midi with views
composer require jawira/db-draw
If you liked this project, ? star it on GitHub.
This library is licensed under the MIT license.
*
<dl>
<dt>
<a href="https://packagist.org/packages/jawira/plantuml-client"> jawira/plantuml-client
<img alt="GitHub stars" src="https://badgen.net/github/stars/jawira/plantuml-client?icon=github"/></a>
</dt> <dd>Convert PlantUML diagrams into images.</dd>
<dt>
<a href="https://packagist.org/packages/jawira/plantuml-encoding"> jawira/plantuml-encoding
<img alt="GitHub stars" src="https://badgen.net/github/stars/jawira/plantuml-encoding?icon=github"/></a>
</dt> <dd>PlantUML encoding functions.</dd>
<dt>
<a href="https://packagist.org/packages/jawira/plantuml">jawira/plantuml
<img alt="GitHub stars" src="https://badgen.net/github/stars/jawira/plantuml?icon=github"/></a>
</dt> <dd>Provides PlantUML executable and plantuml.jar</dd>
<dt><a href="https://packagist.org/packages/jawira/">more...</a></dt> </dl>
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Example | Example script | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.