PHP code example of rtcoder / laravel-db-erd

1. Go to this page and download the library: Download rtcoder/laravel-db-erd library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rtcoder / laravel-db-erd example snippets


return [
    'default_driver' => env('DB_ERD_DRIVER', 'mysql'),
    'output_directory' => storage_path('erd'),
    'output_name' => 'erd_diagram',
    'output_format' => 'pdf',
    'exclude_tables' => ['migrations', 'jobs', 'failed_jobs'],
];
bash
php artisan vendor:publish --tag=db-erd-config
bash
php artisan vendor:publish --tag=db-erd-views
bash
php artisan erd:generate --output=storage/erd/erd_diagram.pdf --driver=mysql