Download the PHP package recca0120/laravel-erd without Composer

On this page you can find all versions of the php package recca0120/laravel-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-erd

Laravel ERD

Latest Version on Packagist GitHub Tests Action Status Total Downloads

繁體中文

Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel Eloquent models. No real database connection required — it uses an in-memory SQLite database by default, so you can generate ERDs anywhere, including CI/CD pipelines.

It displays the results using the interactive erd-editor web component, or exports to SVG.

Preview

View Live Demo

Requirements

Dependency Version
PHP 8.1, 8.2, 8.3, 8.4
Laravel 8, 9, 10, 11, 12

Installation

Quick Start

1. Generate the ERD

This scans your app/ directory for Eloquent models, runs your migrations on an in-memory SQLite database, and generates a .sql DDL file.

2. View in Browser

Visit your application at:

The interactive editor supports dark mode, automatic layout, and a theme builder.

Output Formats

The output format is determined by the --file extension:

Extension Format Description Requires Binary
.sql SQL DDL CREATE TABLE and ALTER TABLE statements (default) No
.er ER Notation Entity-relationship notation viewable in erd-editor No
.svg SVG Diagram Visual diagram with zoom/pan support Yes

Generating SVG

SVG output requires the erd-go and graphviz-dot binaries. Install them with:

Then generate:

View at: http://localhost/laravel-erd/erd.svg

Command Options

Option Description Default
database Database connection name to use database.default from config
--directory Directory to scan for Eloquent models app/
--file Output filename (extension determines format) {database}.sql
--path Migration path (passed to artisan migrate) —
--regex File pattern to match models *.php
--excludes Comma-separated table names to exclude —
--graceful Print error message instead of throwing an exception false

Examples

Supported Relationships

Laravel ERD detects the following Eloquent relationships:

Configuration

Publish the config file:

This creates config/laravel-erd.php:

Custom Output Path

By default, generated files are stored in storage/framework/cache/laravel-erd/. To save ERDs as project documentation:

Web Viewer Middleware

Protect the web viewer in production:

Per-Connection Database Overrides

By default, all database connections are replaced with in-memory SQLite during ERD generation. This means you don't need a running database server.

If you need a specific connection to use a real database (e.g., for database-specific column types), you can override it:

Connections not listed here will continue to use the default in-memory SQLite.

How It Works

  1. Backup — Current database and cache configuration is saved
  2. Override — All connections are replaced with in-memory SQLite (unless overridden in config)
  3. Migrate — Runs artisan migrate to create the schema
  4. Scan — Finds Eloquent models in the target directory using nikic/php-parser
  5. Analyze — Discovers relationships by inspecting model methods
  6. Generate — Outputs the ERD in the requested format
  7. Restore — Original database configuration is restored

Your actual database is never modified.

Publishable Assets

Asset Destination
Config config/laravel-erd.php
Views resources/views/vendor/laravel-erd/
Frontend assets public/vendor/laravel-erd/

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-erd with dependencies

PHP Build Version
Package Version
Requires ext-sqlite3 Version *
illuminate/collections Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0|dev-master
illuminate/database Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
nikic/php-parser Version ^5.1.0
php-http/client-common Version ^2.7
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 recca0120/laravel-erd contains the following files

Loading the files please wait ...