beyondcode/laravel-er-diagram-generator

Is it possible to show name of Pivot tables

Closed this issue · 4 comments

On my Many-Many relationships, the Pivot tables are generated with just the name Pivot in the diagram. Is it possible to show the name of them from the table name?

Thanks

@f7n did you find a solution for this? Please let me know if you did.

No time for a PR right now, but as quick hack in Graphbuilder.php add e.g.
$label = $label . ' (' . $eloquentRelation->getTable() .')';
in line 172.

If you want the table name displayed for all nodes, then add e.g.
$label = $label . ' (' . $model->getTable() .')';
at the top of getModelLabel method in Graphbuilder.php

Related to #89