Download the PHP package rtcoder/laravel-db-erd without Composer

On this page you can find all versions of the php package rtcoder/laravel-db-erd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-db-erd

Laravel DB ERD Generator


A Laravel package for generating Entity-Relationship Diagrams (ERD) of your database schema. This tool is designed to support multiple database systems like MySQL, PostgreSQL, SQLite, SQL Server, and Oracle.


Features


Installation

Requirements

Step 1: Install the package

Step 2: Publish the configuration (optional)

If you need to customize the behavior, publish the configuration file:

If you need to customize the views, you can publish them using:

This will copy the default views to your project's resources/views/vendor/laravel-erd directory, where you can modify them as needed.

Step 3: Install Graphviz

Ensure Graphviz is installed on your system.

On macOS:

On Ubuntu:

On Windows:

Download and install from Graphviz's official site.


Usage

Generate an ERD Run the following Artisan command to generate the ERD:

The --output option specifies the file path for the generated diagram.

Check Graphviz availability

The command verifies that the Graphviz dot binary is available in PATH and prints its detected path and version.

Generate from your application code

You can also resolve the service from the container:

Service usage

The package registers the generator in Laravel's service container, so you can generate diagrams from controllers, jobs, commands, scheduled tasks, tests, or any other application service.

Available bindings:

Binding Description
Rtcoder\LaravelERD\Contracts\ERDGeneratorInterface Recommended dependency injection target.
Rtcoder\LaravelERD\Services\ERDGenerator Concrete generator implementation.
erd-generator String alias for quick container resolution.

Controller example:

Queued job example:

Supported Databases

Available database drivers are represented by the Rtcoder\LaravelERD\Enums\DatabaseConnection enum. PostgreSQL also accepts postgres, postgresql, and psql aliases.

Supported output formats

Available output formats are represented by the Rtcoder\LaravelERD\Enums\OutputFormat enum.

Configuration

You can customize the package by modifying the configuration file (config/erd.php):

Exceptions

The package exposes concrete exceptions so you can handle generator failures without catching a generic Exception.

Exception When it is thrown
Rtcoder\LaravelERD\Exceptions\UnsupportedOutputFormatException The output file extension is not one of pdf, png, svg, or html.
Rtcoder\LaravelERD\Exceptions\InvalidConnectionNameException The selected database driver is not supported.
Rtcoder\LaravelERD\Exceptions\DirectoryCreationException The output directory cannot be created.
Rtcoder\LaravelERD\Exceptions\TemporaryFileCreationException The temporary DOT file for Graphviz cannot be created.
Rtcoder\LaravelERD\Exceptions\FileWriteException The generated DOT or HTML file cannot be written.
Rtcoder\LaravelERD\Exceptions\GraphvizRenderException Graphviz exits with a non-zero status while rendering PDF, PNG, or SVG output.
Rtcoder\LaravelERD\Exceptions\ViewNotFoundException The HTML diagram Blade view cannot be found in the application or package paths.
Rtcoder\LaravelERD\Exceptions\ERDException Base exception for runtime generation failures.

Example:


Troubleshooting

Graphviz not found error

Ensure Graphviz is correctly installed and the dot binary is available in your system's PATH.

You can check this from Laravel with:

macOS

Ubuntu / Debian

Windows

Install Graphviz from the official download page, or use one of the package manager commands below:

If the command still cannot find dot, restart your terminal and verify that the Graphviz bin directory is included in PATH.

Empty ERD Diagram

Verify that your database schema has relationships (foreign keys).


License

This package is open-source software licensed under the MIT license.


All versions of laravel-db-erd with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.48.29|^11.44.1|^12.1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rtcoder/laravel-db-erd contains the following files

Loading the files please wait ...