Skip to content

Commit

Permalink
Merge pull request #16 from jawira/docs
Browse files Browse the repository at this point in the history
Improve doc
  • Loading branch information
jawira authored Jun 21, 2021
2 parents 5b3ef61 + 912064e commit f2a2d9f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
24 changes: 24 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.idea export-ignore
/.phive export-ignore
/.psalm export-ignore
/.php-cs-fixer.dist.php export-ignore
/CHANGELOG.md export-ignore
/README.md export-ignore
/build export-ignore
/build.png export-ignore
/build.xml export-ignore
/docs export-ignore
/examples export-ignore
/phpstan export-ignore
/phpunit.xml export-ignore
/phpunit.xml.dist export-ignore
/resources export-ignore
/tests export-ignore

# Configure diff output for .php and .phar files.
*.php diff=php
*.phar -diff
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# DB Draw
# 📐 DB Draw

**Generate an ER diagram from your existing database.**

[![Latest Stable Version](http://poser.pugx.org/jawira/db-draw/v)](https://packagist.org/packages/jawira/db-draw)
[![.gitattributes](http://poser.pugx.org/jawira/db-draw/gitattributes)](https://packagist.org/packages/jawira/db-draw)
[![composer.lock](http://poser.pugx.org/jawira/db-draw/composerlock)](https://packagist.org/packages/jawira/db-draw)
[![License](http://poser.pugx.org/jawira/db-draw/license)](https://packagist.org/packages/jawira/db-draw)

## How to use

Because **DB Draw** is a library, you have to use it as a dependency and instantiate it in your project.
Expand Down Expand Up @@ -42,9 +47,9 @@ file_put_contents('database.png', $png);

```php
$dbDraw = new DbDraw($connection);
$miniDiagram = $dbDraw->generatePuml(DbDraw::MINI); // only table names
$midiDiagram = $dbDraw->generatePuml(DbDraw::MIDI); // like mini with columns
$maxiDiagram = $dbDraw->generatePuml(DbDraw::MAXI); // like midi with views
$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
```

![mini-diagram](resources/output/mini.png)
Expand All @@ -56,7 +61,7 @@ $maxiDiagram = $dbDraw->generatePuml(DbDraw::MAXI); // like midi with views
## Installing

```console
$ composer require jawira/db-draw
composer require jawira/db-draw
```

## Contributing
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jawira/db-draw",
"type": "library",
"description": "\ud83d\udcf8 Create an ER diagram from your existing DB",
"description": "\uD83D\uDCD0 Create an ER diagram from your existing DB",
"keywords": [
"database",
"db",
Expand All @@ -12,8 +12,7 @@
"license": "MIT",
"authors": [
{
"name": "Jawira Portugal",
"email": "[email protected]"
"name": "Jawira Portugal"
}
],
"require": {
Expand Down

0 comments on commit f2a2d9f

Please sign in to comment.