Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Erd Laravel

Erd Laravel Laravel Package

superciety/erd-laravel

Generate entity relationship diagrams (ERDs) directly from your Laravel Eloquent models. This package inspects models and their relationships to produce clear visual schema diagrams, making it easy to understand, document, and share your database structure.

View on GitHub
Deep Wiki
Context7

MultiversX SDK for Laravel (written in PHP).

Frequently asked questions about Erd Laravel
How do I install superciety/erd-laravel in a Laravel application?
Install it with Composer using composer require superciety/erd-laravel. Laravel package auto-discovery registers the service provider, so no manual entry in config/app.php is normally required. If the package ships a configuration file, publish it with the vendor:publish command so you can adjust model paths and exclusions.
Which Laravel and PHP versions does erd-laravel support?
The package targets modern Laravel releases and modern PHP versions, but you should confirm the exact constraints in its composer.json before installing. Read the illuminate/support and php requirements rather than relying on the README alone. If you are on an older Laravel major, check whether a compatible tagged release exists.
How does the package discover relationships between Eloquent models?
It inspects your Eloquent model classes and reflects on their relationship methods, such as hasMany, belongsTo, belongsToMany, and the polymorphic variants. From those methods it builds a graph of entities and edges that it renders as a schema diagram. This means relationships defined outside methods, or via raw queries, will not appear in the output.
Can I limit the ERD to specific models, tables, or namespaces?
Yes, the package is configuration-driven so you can point it at specific model directories or namespaces and exclude models you do not want in the diagram. Filtering is useful on large applications where a full schema diagram becomes unreadable. Check the published config file for the include and exclude options available in your installed version.
What output format does the generated ERD use?
The package produces visual entity relationship diagrams from your discovered schema rather than a text-only schema dump. The exact rendering and export options depend on the version you install, so review the README for supported outputs. If you need a specific format such as SVG or Mermaid, verify it is available before standardizing on this tool.
Do I need to register a service provider or facade manually?
In a standard Laravel application, no. Composer auto-discovery handles service provider registration, and any facade the package exposes is aliased automatically. Manual registration is only needed in unusual setups, such as non-standard bootstrapping or when auto-discovery is disabled.
Is it safe to run erd-laravel in production?
It is a development and documentation tool, so run it locally or in CI rather than on production hosts. It reads model definitions and relationship metadata, which is a read-only operation, but it is not intended to be part of your runtime request path. Keeping it in require-dev also prevents it from shipping to production.
How can I test or keep the generated ERD up to date?
Generate the diagram as part of a documented workflow and commit the output to your repository so reviewers can see schema changes in pull requests. You can also run the generation command in CI and fail the build if the committed diagram is stale. Treat the diagram like any other generated artifact with a reproducible command.
What are the alternatives to generating ERDs from Eloquent models?
Alternatives include drawing diagrams manually in tools like dbdiagram.io, exporting your schema with Laravel's schema dump, or using generic database introspection tools against a live database. The advantage of this package is that it works from your Eloquent relationship definitions rather than raw foreign keys, which better reflects how your application actually models data.
How actively is superciety/erd-laravel maintained, and what should I watch on upgrades?
It is a small package with limited visible maintainer activity, so pin the version in composer.json and review changes before upgrading. On each bump, read the composer.json diff for Laravel and PHP constraint changes, since a major version may simply drop old framework support. Because the package reads your models at runtime, a Laravel upgrade is the more likely source of breakage than the diagram code itself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core