https://github.com/dynamik-dev/db-chart
https://github.com/dynamik-dev/db-chart
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dynamik-dev/db-chart
- Owner: dynamik-dev
- License: mit
- Created: 2025-05-25T03:45:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-25T03:54:45.000Z (about 1 year ago)
- Last Synced: 2025-07-14T06:30:00.449Z (12 months ago)
- Language: PHP
- Size: 666 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
## DbChart
This package is a simple package that allows you to generate a Mermaid diagram of your database schema. It will update in real time as you make changes to your database.

> [!WARNING]
> This package is intended for development use only and is simply a POC. Do not use in production environments as it exposes your database schema.
## Installation
```bash
composer require dynamikdev/db-chart
```
## Usage
Visit `/db-chart` to see the diagram!.
## Configuration
### Authorization
You can configure the package by adding a callback to the `DbChartServiceProvider` class. Here's an example of how to authorize the diagram to only be visible to authenticated users.
```php
// AppServiceProvider.php
public function register()
{
DbChartServiceProvider::authorizeUsing(function () {
return auth()->check();
});
}
```