mherrera05/data-dictionary
Laravel package that generates a data dictionary for your application. Document models, tables, columns, types, and relationships, then export a clear reference that keeps developers, analysts, and stakeholders aligned on your data model.
Before installing, read composer.json in the repo. The description calls this a "Bundle", which in PHP terminology almost always means a Symfony bundle — verify the require block for symfony/* versus illuminate/* before assuming Laravel support. With 0 stars and 0 dependents there is no ecosystem evidence that Laravel is a supported target, so treat installation as an evaluation, not an adoption.
Practical first steps:
composer require --dev mherrera05/data-dictionary
extra.laravel.providers entry, you'll need to register the service provider manually in config/app.php (or bootstrap/providers.php on Laravel 11+). If the package only ships a Symfony Bundle class and a DependencyInjection extension, stop here — see the fallback below.information_schema or uses Doctrine's SchemaManager.docs/database.md.If the package turns out to be Symfony-only, the equivalent in Laravel 10/11 is a handful of lines and worth doing yourself:
$tables = Schema::getTables();
$columns = Schema::getColumns('orders');
$indexes = Schema::getIndexes('orders');
$fks = Schema::getForeignKeys('orders');
That is roughly the entire feature surface a package like this provides, which informs how much you should invest in making it work.
Generate as a build artifact, never at request time. Schema introspection issues multiple metadata queries per table; running it in a controller or a view composer will tank response times on databases with hundreds of tables. Wrap it in an Artisan command (or a queued job) and treat the output like compiled assets:
// app/Console/Commands/GenerateDataDictionary.php
public function handle(DataDictionary $dictionary): int
{
$output = $dictionary->forConnection(config('database.default'))
->except(['migrations', 'jobs', 'failed_jobs', 'sessions', 'telescope_*'])
->toMarkdown();
File::put(base_path('docs/database.md'), $output);
return self::SUCCESS;
}
Wrap the package behind your own interface. Given the maintenance risk, don't let mherrera05/data-dictionary types leak into your application code. Define a SchemaDictionary contract in your app and put the package behind one adapter class. Swapping to Schema::getColumns() later becomes a one-file change.
CI schema-drift detection. Generate the dictionary on a schedule (or per-PR against a freshly migrated database) and diff it. A non-empty diff on a PR that doesn't touch migrations is a useful signal that someone changed the DB by hand. Pair this with a migrate:fresh + generate step so the dictionary always reflects migrations rather than whatever is in a long-lived dev database.
Documentation for onboarding. The highest-value use is a docs/database.md regenerated per release. It answers the question every new hire asks — "what's in orders and what references it?" — without granting them a database client. Commit it, or publish it to your internal wiki in CI.
Combine with migrations for a two-way view. Migrations describe intent; the dictionary describes current state. If they diverge, one of them is lying. Reviewing the generated dictionary alongside a migration in a PR is a cheap sanity check on column types, nullability, and index coverage.
Filter aggressively. A raw dump of an app database is dominated by framework noise. Exclude migrations, jobs, failed_jobs, sessions, cache*, telescope_*, pulse_*, and any log tables — otherwise the useful 15 tables are buried under 20 irrelevant ones.
composer.json, or fork it into packages/ and reference it via a path repository. If the introspection logic is under ~300 lines, copying it into your app is lower risk than depending on it.symfony/dependency-injection and Doctrine's doctrine/dbal will not wire into Laravel's container; you'd be using it as a library, not an integration, if at all.forConnection() (or equivalent) actually exists before designing around it.SHOW CREATE TABLE orders or \d+ orders on a table you know well before trusting it on 200 tables.information_schema directly. Formatting bugs are obvious; missing columns usually mean the introspection query filtered them out.information_schema query and write your own renderer.Schema::getTables() / getColumns() / getIndexes() / getForeignKeys() gives you the same result with zero dependency risk.How can I help you explore Laravel packages today?