recca0120 / laravel-erd
Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel models and displays them using Vuerd.
Installs: 4 748
Dependents: 0
Suggesters: 0
Security: 0
Stars: 260
Watchers: 6
Forks: 12
Open Issues: 8
Requires
- ext-sqlite3: *
- illuminate/collections: ^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0
- illuminate/filesystem: ^8.0|^9.0|^10.0|^11.0
- nikic/php-parser: ^5.1.0
- php-http/client-common: ^2.7
Requires (Dev)
- awobaz/compoships: ^2.3
- doctrine/dbal: ^3.5
- guzzlehttp/guzzle: ^7.5
- mockery/mockery: ^1.5
- orchestra/testbench: ^6.25|^7.13|^8.0|^9.0
- php-http/mock-client: ^1.6
- phpunit/phpunit: ^9.5|^10.0|^11.0
- spatie/laravel-permission: ^5.7|^6.0
- spatie/phpunit-snapshot-assertions: ^4.2|^5.1.6
This package is auto-updated.
Last update: 2024-11-04 17:14:05 UTC
README
Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel models and displays them using erd-editor.
Preview
Here's a sample of what you can expect, generated from migrations and models:
Requirements
Installation
Install the package via Composer:
composer require recca0120/laravel-erd:^0.1 --dev
Usage
Step 1: Generate the ERD
Run the following command:
php artisan erd:generate
Step 2: View the ERD
Open the following URL in your browser:
Advanced Usage
Exclude Tables and Save to a Different Filename
step 1.
Run the command:
php artisan erd:generate --file=exclude-users.sql --excludes=users
step 2.
Open the URL:
http://localhost/laravel-erd/exclude-users
Generate an SVG Version
step 1.
Install erd-go and graphviz-dot.js using:
php artisan erd:install
step 2.
Generate the SVG file:
php artisan erd:generate --file=laravel-erd.svg
step 3.
View the SVG version:
http://localhost/laravel-erd/laravel-erd.svg
The SVG file can be found at storage/framework/cache/laravel-erd.
Feel free to ask if you have any questions or need further assistance!