PHP Classes

How to View Laravel Model Relationships on a Web Page Using the Package Laravel Truss: View a diagram of a Laravel application models

Recommend this page to a friend!
     
  Info   Demos   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2026-08-04 (3 days ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
laravel-truss 1.6.1MIT/X Consortium ...8.3Databases, Tools, Design Patterns, PHP 8
Description 

Author

This package can be used to view a diagram of a Laravel application model classes.

It provides a web application that can retrieve the schema of a database used by model classes of a Laravel application using JavaScript to send calls to a web server API that provides the details of the database.

The JavaScript code on the browser side can retrieve the database schema and display a diagram of database tables, table fields, and table field relations.

Currently the application can let the users:

- Scroll and zoom the database diagram

- Focus on specific tables

- Show the original types of the Laravel model classes that correspond to table fields

- Export the diagram as a file in PNG, SVG, Markdown data dictionary and DBML

- Switch between the main database schema and modules

- A theme builder to define presentation fonts and colors

- A schema health analyzer that provides schema improvement suggestions

- Show changes since the last migration

Picture of Alberto Arena
  Performance   Level  
Name: Alberto Arena <contact>
Classes: 5 packages by
Country: Italy Italy
Innovation award
Innovation award
Nominee: 3x

Instructions

Read the full documentation in the project site.

Details

Laravel Truss

<picture> <source media="(prefers-color-scheme: dark)" srcset="art/cover-dark.png"> <img src="art/cover-light.png" alt="Laravel Truss: see your database structure as a live, zoomable ER diagram"> </picture>

Documentation Latest Version on Packagist Total Downloads Tests License Repo views

Laravel Truss is a live database structure viewer. It scans your live schema and renders it as a scrollable, zoomable ER diagram right inside your app, so you can see how the tables actually connect without opening a DB client. It reads structure only (tables, columns, keys, indexes); row data is never queried or exposed.

Try the live demo to pan, zoom, focus, and export a sample schema in your browser, no install needed, then build a palette in the theme builder and copy the config. See what has shipped and what is next on the roadmap.

> Stay updated: click Watch > Custom > Releases to hear about new features, or follow along in Discussions.

Features

  • Live ER diagram of your database, rendered with Mermaid.
  • Focus mode: a table and its foreign-key neighbours, centred and highlighted.
  • Filter by table name, and toggle native types against Laravel-style labels.
  • Map-style pan and zoom, with auto-fit and a Fit button.
  • Export the diagram as PNG or SVG, or its structure as JSON, CSV, a Markdown data dictionary, or DBML, from the browser or, for CI and tooling, from the command line with `php artisan truss:export`. Structure-only and deterministic.
  • Schema diff: see what changed since your last migration, in a dashboard "Changes" panel and via `php artisan truss:diff`. Structure-only, added / removed / changed tables, columns, indexes, and foreign keys.
  • Schema doctor: review your structure for problems (missing primary keys, unindexed foreign keys, duplicate indexes, risky types) in the terminal or in CI with `php artisan truss:doctor`, and in a dashboard "Health" panel that flags the same problems on the diagram. Deterministic and structure-only, no AI.
  • Multiple connections: list them in config and switch between their diagrams with a toolbar picker, each scoped to its own database.
  • Light and dark "blueprint" theme, or bring your own: define custom colours and fonts from config to match your app. Config driven, CSP-safe, no build step.
  • Self-contained: Mermaid and fonts are vendored and served from the package, so it works offline and under a strict Content-Security-Policy (no CDN).
  • Cached snapshot, rebuilt automatically after migrations.

Documentation

Full documentation is at trussphp.com.

Installation

For local use, install Truss as a dev dependency:

composer require albertoarena/laravel-truss --dev

To run Truss gated on staging or production, install it as a regular dependency instead. Dev dependencies are excluded from composer install --no-dev builds, so a --dev install never reaches a production deploy and /truss returns 404 there:

composer require albertoarena/laravel-truss

Requires PHP 8.3+ and Laravel 12+. The service provider is auto-discovered, so there is nothing to publish to get started.

Quick start

By default Truss is enabled in the local environment only. Start your app and visit:

/truss

To use Truss in a non-local environment you must both enable it and authorize the viewers. See Authorization.

Multiple connections

Out of the box Truss visualizes your application's default database connection. If your app spans more than one connection, for example a main database alongside a separate module database, list the connections you want to visualize under truss.connections:

// config/truss.php
'connections' => [
    'mysql' => [],
    'modules' => ['excluded_tables' => ['module_jobs']],
],

When two or more connections are configured, a connection picker appears in the dashboard toolbar. Switching it re-renders that connection's schema, and the selection is kept in the URL so a given view can be shared or bookmarked. Each connection is introspected against its own database only, so a shared server never shows tables that belong to another database.

The keys are Laravel connection names from config/database.php. Per-connection options mirror the global ones (such as excluded_tables), so you can hide different tables on each connection.

Schema doctor

php artisan truss:doctor (aliased truss:check) reviews your database structure for problems visible from structure alone: a table with no primary key, a foreign key with no index, duplicate indexes, money stored as a float, and more. It is deterministic and structure-only, with no AI and no network call, so it is safe to run in CI.

php artisan truss:doctor
php artisan truss:doctor --connection=mysql --format=json
php artisan truss:doctor --preset=strict --fail-on=warning

It exits 0 when clean, 1 when a finding is at or above the --fail-on level (default error), and 2 on a bad option or a snapshot error, so a migration that introduces a problem can fail the build. Presets (recommended, strict, none), per-rule severity and enable / disable, ignore patterns, and the fail level are all configurable under truss.doctor. See the configuration reference.

Every finding carries a stable code (e.g. TRUSS-IDX-001) shown in both the command and the panel; the schema doctor guide lists all the rule codes and what each checks.

Structure only: it reads the same cached snapshot the diagram uses and never queries row data.

In the dashboard

The same findings show in the dashboard, under the name Health: the command is truss:doctor, and the dashboard front end for it is the heart icon in the toolbar labelled "Health". Same feature, same findings. The Health panel lists them grouped by table, and every table with a problem carries a small severity badge on the diagram, so you can see what needs attention at a glance. Open the panel to read the findings, click a table to focus it, or click the marked column to see the finding for that field. Heuristic (lower-confidence) findings are marked as such.

It rides the schema endpoint the diagram already loads, so there is no extra request. Two switches control it under truss.doctor:

  • `dashboard` (env `TRUSS_DOCTOR_DASHBOARD`, default on): show the Health panel at all. When off, the dashboard never receives any findings and the CLI is untouched.
  • `flag_tables` (env `TRUSS_DOCTOR_FLAG_TABLES`, default on): always badge tables with findings on the diagram, even with the panel closed. Turn it off to keep the diagram clean and surface findings only when the panel is open.

Schema export

php artisan truss:export writes your database structure to a standard format for CI, tooling, and version control. It is the command-line counterpart to the dashboard's export button, generated from PHP so it does not need a human with the diagram open. Deterministic and structure-only, with no network call, so it is safe in CI and commit hooks.

php artisan truss:export                                  # DBML to stdout
php artisan truss:export --format=json                    # dbml, json, csv, markdown, or mermaid
php artisan truss:export --format=dbml --output=docs/schema.dbml
php artisan truss:export --tables=orders,order_lines      # only these (config exclusions still apply)
php artisan truss:export --connection=mysql --exclude=telemetry

Output goes to stdout by default so it pipes cleanly; --output writes a file. The output is deterministic: the same schema always produces the same bytes, whatever order the database reports its tables in. That is what makes the CI drift-check reliable:

# Fail the build if the committed schema file is out of date
php artisan truss:export --format=dbml --output=docs/schema.dbml --check

--check regenerates the export, compares it against --output, writes nothing, and exits non-zero when they differ, so a migration that changes the schema without refreshing the committed file fails the build. Exit codes: 0 written or up to date, 1 --check found drift, 2 a usage or runtime error (unknown format, unwritable path, an unmanaged connection, --check without --output, or no tables matched the filters). Add --fresh to rebuild the cached snapshot before exporting.

Config excluded_tables always wins over --tables, so the export never exposes a table the dashboard hides. Structure only: it reads the same cached snapshot the diagram uses and never queries row data.

Theming

Truss ships a light and dark "blueprint" theme. To match the app it is embedded in, redefine its colours and fonts from config under truss.theme. Everything is optional: you set a few semantic knobs and the rest stay on the default, so a handful of values re-skins the whole dashboard (chrome and diagram) in both light and dark.

Prefer to design it visually? The theme builder lets you dial in colours and fonts against a live dashboard preview and copy the config block straight into config/truss.php.

If you have not published the config yet (Truss works fine without it), publish it first with php artisan vendor:publish --tag=truss-config, then edit the theme block:

// config/truss.php
'theme' => [
    'fonts' => [
        'sans' => 'Inter, system-ui, sans-serif',
    ],
    'colors' => [
        'light' => [
            'accent' => '#3730a3',
            'background' => '#ffffff',
        ],
        'dark' => [
            'accent' => '#a5b4fc',
            'background' => '#0b1020',
        ],
    ],
],

The colour knobs are accent, accent-secondary, background, surface, surface-alt, text, muted, and border; each maps onto the tokens it paints (accent, for instance, covers headings, primary-key badges, entity borders, and the focus ring). Set a knob under both light and dark to theme both modes, or omit dark to theme light only. Colours accept hex, rgb() / hsl(), or a CSS colour keyword; fonts are family names only, so name a font your app already loads or a system font (Truss serves no font files here).

The overrides are delivered as a same-origin stylesheet, so a strict Content-Security-Policy still needs only style-src 'self' (no inline styles), and a default install with no custom theme makes no extra request. Each value is validated before it is emitted, so an invalid value is ignored and falls back to the default rather than breaking the sheet. Contrast is yours to check: a custom palette can fail accessibility, so verify both modes against WCAG AA.

Storage

Truss keeps its schema snapshot in the cache, which is derived and disposable. The one thing it writes to disk is the schema-diff baseline: a structure-only JSON file (never row data) recorded after each migration so the diff can show what changed. It lives at truss/baselines/{connection}.json on the disk set by truss.diff.disk (the default disk otherwise), is safe to delete, and is worth gitignoring alongside storage/. To turn the feature off entirely so nothing is written to disk, set TRUSS_DIFF_ENABLED=false (or truss.diff.enabled to false).

Security

Truss exposes structure only and never queries row data. Access is protected by the fixed viewTruss gate. If you discover a security issue, please email me@albertoarena.it rather than opening a public issue.

Contributing

Contributions are welcome. Feel free to fork, improve, and open a pull request.

Support

Laravel Truss is free and open source. If it has saved you time, you can support its ongoing maintenance and new features with a coffee:

ko-fi.com/albertoarena

Starring the repo and sharing it help just as much.

License

The MIT License (MIT). See LICENSE.


  Laravel Truss demoExternal page  

Open in a separate window

  Files folder image Files (194)  
File Role Description
Files folder image.claude (1 directory)
Files folder image.github (1 file, 1 directory)
Files folder imageart (6 files)
Files folder imageconfig (1 file)
Files folder imagedocs (3 files, 1 directory)
Files folder imageresources (4 directories)
Files folder imagesrc (1 file, 9 directories)
Files folder imagetests (2 files, 6 directories)
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file CLAUDE.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file pint.json Data Auxiliary data
Accessible without login Plain text file playwright.config.js Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file vitest.config.js Data Auxiliary data

  Files folder image Files (194)  /  .claude  
File Role Description
Files folder imagerules (3 files)

  Files folder image Files (194)  /  .claude  /  rules  
File Role Description
  Accessible without login Plain text file frontend.md Data Auxiliary data
  Accessible without login Plain text file introspection.md Data Auxiliary data
  Accessible without login Plain text file release.md Data Auxiliary data

  Files folder image Files (194)  /  .github  
File Role Description
Files folder imageworkflows (3 files)
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data

  Files folder image Files (194)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file github-traffic-badge.yml Data Auxiliary data
  Accessible without login Plain text file lint.yml Data Auxiliary data
  Accessible without login Plain text file run-tests.yml Data Auxiliary data

  Files folder image Files (194)  /  art  
File Role Description
  Accessible without login Image file cover-dark.png Icon Icon image
  Accessible without login Image file cover-light.png Icon Icon image
  Accessible without login HTML file cover.html Doc. Documentation
  Accessible without login Plain text file render-cover.mjs Data Auxiliary data
  Accessible without login Image file theme-builder-dark.png Icon Icon image
  Accessible without login Image file theme-builder-light.png Icon Icon image

  Files folder image Files (194)  /  config  
File Role Description
  Accessible without login Plain text file truss.php Aux. Configuration script

  Files folder image Files (194)  /  docs  
File Role Description
Files folder imageplans (4 files, 1 directory)
  Accessible without login Plain text file DECISIONS.md Data Auxiliary data
  Accessible without login Plain text file DESIGN.md Data Auxiliary data
  Accessible without login Plain text file INSTRUCTIONS.md Data Auxiliary data

  Files folder image Files (194)  /  docs  /  plans  
File Role Description
Files folder imagecompleted (2 files)
  Accessible without login Plain text file semantic-relationship-labels.md Data Auxiliary data
  Accessible without login Plain text file tenant-aware-snapshot-caching.md Data Auxiliary data
  Accessible without login Plain text file truss-doctor-dashboard.md Data Auxiliary data
  Accessible without login Plain text file truss-doctor.md Data Auxiliary data

  Files folder image Files (194)  /  docs  /  plans  /  completed  
File Role Description
  Accessible without login Plain text file data-dictionary-dbml-export.md Data Auxiliary data
  Accessible without login Plain text file schema-diff.md Data Auxiliary data

  Files folder image Files (194)  /  resources  
File Role Description
Files folder imagecss (1 file)
Files folder imagefonts (1 file)
Files folder imagejs (11 files, 1 directory)
Files folder imageviews (1 file)

  Files folder image Files (194)  /  resources  /  css  
File Role Description
  Accessible without login Plain text file truss.css Data Auxiliary data

  Files folder image Files (194)  /  resources  /  fonts  
File Role Description
  Accessible without login Plain text file IBM-Plex.LICENSE Lic. License text

  Files folder image Files (194)  /  resources  /  js  
File Role Description
Files folder imagevendor (2 files)
  Accessible without login Plain text file dbml-export.js Data Auxiliary data
  Accessible without login Plain text file diff-view.js Data Auxiliary data
  Accessible without login Plain text file doctor-view.js Data Auxiliary data
  Accessible without login Plain text file markdown-export.js Data Auxiliary data
  Accessible without login Plain text file mermaid-definition.js Data Auxiliary data
  Accessible without login Plain text file selection.js Data Auxiliary data
  Accessible without login Plain text file table-export.js Data Auxiliary data
  Accessible without login Plain text file truss.js Data Auxiliary data
  Accessible without login Plain text file type-labels.js Data Auxiliary data
  Accessible without login Plain text file url-state.js Data Auxiliary data
  Accessible without login Plain text file viewport.js Data Auxiliary data

  Files folder image Files (194)  /  resources  /  js  /  vendor  
File Role Description
  Accessible without login Plain text file mermaid.LICENSE Lic. License text
  Accessible without login Plain text file mermaid.min.js Data Auxiliary data

  Files folder image Files (194)  /  resources  /  views  
File Role Description
  Accessible without login Plain text file index.blade.php Aux. Configuration script

  Files folder image Files (194)  /  src  
File Role Description
Files folder imageCache (1 file)
Files folder imageCommands (6 files)
Files folder imageDiff (2 files)
Files folder imageDoctor (8 files, 3 directories)
Files folder imageExport (6 files, 1 directory)
Files folder imageHttp (2 directories)
Files folder imageIntrospection (2 files, 1 directory)
Files folder imageListeners (1 file)
Files folder imageTheme (1 file)
  Plain text file TrussServiceProvider.php Class Class source

  Files folder image Files (194)  /  src  /  Cache  
File Role Description
  Plain text file SchemaCacheRepository.php Class Class source

  Files folder image Files (194)  /  src  /  Commands  
File Role Description
  Plain text file DiffCommand.php Class Class source
  Plain text file DoctorCommand.php Class Class source
  Plain text file ExportCommand.php Class Class source
  Plain text file OpenCommand.php Class Class source
  Plain text file RebuildCommand.php Class Class source
  Plain text file ShowCommand.php Class Class source

  Files folder image Files (194)  /  src  /  Diff  
File Role Description
  Plain text file BaselineStore.php Class Class source
  Plain text file SchemaDiffer.php Class Class source

  Files folder image Files (194)  /  src  /  Doctor  
File Role Description
Files folder imageContracts (2 files)
Files folder imageFormatters (2 files)
Files folder imageRules (3 directories)
  Accessible without login Plain text file Category.php Aux. Configuration script
  Accessible without login Plain text file Confidence.php Aux. Configuration script
  Plain text file DoctorReport.php Class Class source
  Plain text file DoctorRunner.php Class Class source
  Plain text file Finding.php Class Class source
  Plain text file FindingCollection.php Class Class source
  Plain text file RuleRegistry.php Class Class source
  Accessible without login Plain text file Severity.php Example Example script

  Files folder image Files (194)  /  src  /  Doctor  /  Contracts  
File Role Description
  Plain text file Formatter.php Class Class source
  Plain text file Rule.php Class Class source

  Files folder image Files (194)  /  src  /  Doctor  /  Formatters  
File Role Description
  Plain text file ConsoleFormatter.php Class Class source
  Plain text file JsonFormatter.php Class Class source

  Files folder image Files (194)  /  src  /  Doctor  /  Rules  
File Role Description
Files folder imageIndex (6 files)
Files folder imageIntegrity (5 files)
Files folder imageType (2 files)

  Files folder image Files (194)  /  src  /  Doctor  /  Rules  /  Index  
File Role Description
  Plain text file DuplicateIndex.php Class Class source
  Plain text file ForeignKeyWithoutIndex.php Class Class source
  Plain text file IndexDuplicatingPrimaryKey.php Class Class source
  Plain text file MissingUniqueConstraint.php Class Class source
  Plain text file RedundantPrefixIndex.php Class Class source
  Plain text file UnindexedSoftDelete.php Class Class source

  Files folder image Files (194)  /  src  /  Doctor  /  Rules  /  Integrity  
File Role Description
  Plain text file ForeignKeyTypeMismatch.php Class Class source
  Plain text file LikelyMissingForeignKey.php Class Class source
  Plain text file MissingPrimaryKey.php Class Class source
  Plain text file PivotWithoutUniqueKey.php Class Class source
  Plain text file PolymorphicWithoutIndex.php Class Class source

  Files folder image Files (194)  /  src  /  Doctor  /  Rules  /  Type  
File Role Description
  Plain text file BooleanAsString.php Class Class source
  Plain text file MoneyAsFloat.php Class Class source

  Files folder image Files (194)  /  src  /  Export  
File Role Description
Files folder imageContracts (1 file)
  Plain text file CsvGenerator.php Class Class source
  Plain text file DbmlGenerator.php Class Class source
  Plain text file JsonGenerator.php Class Class source
  Plain text file MarkdownGenerator.php Class Class source
  Plain text file MermaidGenerator.php Class Class source
  Plain text file SchemaExporter.php Class Class source

  Files folder image Files (194)  /  src  /  Export  /  Contracts  
File Role Description
  Plain text file Generator.php Class Class source

  Files folder image Files (194)  /  src  /  Http  
File Role Description
Files folder imageControllers (4 files)
Files folder imageMiddleware (1 file)

  Files folder image Files (194)  /  src  /  Http  /  Controllers  
File Role Description
  Plain text file AssetController.php Class Class source
  Plain text file IndexController.php Class Class source
  Plain text file SchemaApiController.php Class Class source
  Plain text file ThemeController.php Class Class source

  Files folder image Files (194)  /  src  /  Http  /  Middleware  
File Role Description
  Plain text file Authorize.php Class Class source

  Files folder image Files (194)  /  src  /  Introspection  
File Role Description
Files folder imageData (4 files)
  Plain text file SchemaSerializer.php Class Class source
  Plain text file SnapshotBuilder.php Class Class source

  Files folder image Files (194)  /  src  /  Introspection  /  Data  
File Role Description
  Plain text file Column.php Class Class source
  Plain text file ForeignKey.php Class Class source
  Plain text file Index.php Class Class source
  Plain text file Table.php Class Class source

  Files folder image Files (194)  /  src  /  Listeners  
File Role Description
  Plain text file RebuildOnMigrationsEnded.php Class Class source

  Files folder image Files (194)  /  src  /  Theme  
File Role Description
  Plain text file ThemeStylesheet.php Class Class source

  Files folder image Files (194)  /  tests  
File Role Description
Files folder imagee2e (12 files)
Files folder imageFeature (2 files, 6 directories)
Files folder imageFixtures (3 directories)
Files folder imagejs (15 files)
Files folder imageSupport (2 files)
Files folder imageUnit (5 directories)
  Plain text file Pest.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files (194)  /  tests  /  e2e  
File Role Description
  Accessible without login HTML file harness.html Doc. Documentation
  Accessible without login Plain text file health-flags.spec.js Data Auxiliary data
  Accessible without login Plain text file health-markers.spec.js Data Auxiliary data
  Accessible without login Plain text file health.spec.js Data Auxiliary data
  Accessible without login Plain text file large-schema.spec.js Data Auxiliary data
  Accessible without login Plain text file overlays.spec.js Data Auxiliary data
  Accessible without login Plain text file schema-diff.spec.js Data Auxiliary data
  Accessible without login Plain text file self-referential.spec.js Data Auxiliary data
  Accessible without login Plain text file serve.mjs Data Auxiliary data
  Accessible without login HTML file toolbar.html Doc. Documentation
  Accessible without login Plain text file toolbar.spec.js Data Auxiliary data
  Accessible without login Plain text file truss.spec.js Data Auxiliary data

  Files folder image Files (194)  /  tests  /  Feature  
File Role Description
Files folder imageCache (2 files)
Files folder imageCommands (5 files)
Files folder imageDiff (1 file)
Files folder imageDoctor (1 file)
Files folder imageHttp (5 files)
Files folder imageIntrospection (2 files)
  Plain text file ConfigTest.php Class Class source
  Plain text file ServiceProviderTest.php Class Class source

  Files folder image Files (194)  /  tests  /  Feature  /  Cache  
File Role Description
  Plain text file RebuildTriggerTest.php Class Class source
  Accessible without login Plain text file SchemaCacheRepositoryTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Feature  /  Commands  
File Role Description
  Plain text file DiffCommandTest.php Class Class source
  Accessible without login Plain text file DoctorCommandTest.php Example Example script
  Accessible without login Plain text file ExportCommandTest.php Example Example script
  Accessible without login Plain text file OpenCommandTest.php Example Example script
  Accessible without login Plain text file ShowCommandTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Feature  /  Diff  
File Role Description
  Accessible without login Plain text file BaselineStoreTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Feature  /  Doctor  
File Role Description
  Accessible without login Plain text file SchemaBuilderContractTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Feature  /  Http  
File Role Description
  Accessible without login Plain text file AssetTest.php Example Example script
  Plain text file AuthorizationTest.php Class Class source
  Accessible without login Plain text file IndexRouteTest.php Example Example script
  Plain text file SchemaApiTest.php Class Class source
  Accessible without login Plain text file ThemeTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Feature  /  Introspection  
File Role Description
  Accessible without login Plain text file FallbackSnapshotTest.php Example Example script
  Accessible without login Plain text file SnapshotBuilderTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Fixtures  
File Role Description
Files folder imagebad-migrations (1 file)
Files folder imageexport (4 files)
Files folder imagemigrations (1 file)

  Files folder image Files (194)  /  tests  /  Fixtures  /  bad-migrations  
File Role Description
  Plain text file 2999_01_01_000000_...tible_migration.php Class Class source

  Files folder image Files (194)  /  tests  /  Fixtures  /  export  
File Role Description
  Accessible without login Plain text file schema.dbml Data Auxiliary data
  Accessible without login Plain text file schema.json Data Auxiliary data
  Accessible without login Plain text file schema.md Data Auxiliary data
  Accessible without login Plain text file schema.mmd Data Auxiliary data

  Files folder image Files (194)  /  tests  /  Fixtures  /  migrations  
File Role Description
  Plain text file 0001_01_01_000000_..._fixture_tables.php Class Class source

  Files folder image Files (194)  /  tests  /  js  
File Role Description
  Accessible without login Plain text file app-anchor.test.js Data Auxiliary data
  Accessible without login Plain text file canvas-css.test.js Data Auxiliary data
  Accessible without login Plain text file dbml-export.test.js Data Auxiliary data
  Accessible without login Plain text file diff-view.test.js Data Auxiliary data
  Accessible without login Plain text file doctor-view.test.js Data Auxiliary data
  Accessible without login Plain text file export-cross-check.test.js Data Auxiliary data
  Accessible without login Plain text file fixtures.js Data Auxiliary data
  Accessible without login Plain text file label-casing.test.js Data Auxiliary data
  Accessible without login Plain text file markdown-export.test.js Data Auxiliary data
  Accessible without login Plain text file mermaid-definition.test.js Data Auxiliary data
  Accessible without login Plain text file selection.test.js Data Auxiliary data
  Accessible without login Plain text file table-export.test.js Data Auxiliary data
  Accessible without login Plain text file type-labels.test.js Data Auxiliary data
  Accessible without login Plain text file url-state.test.js Data Auxiliary data
  Accessible without login Plain text file viewport.test.js Data Auxiliary data

  Files folder image Files (194)  /  tests  /  Support  
File Role Description
  Plain text file SchemaBuilder.php Class Class source
  Plain text file TableDraft.php Class Class source

  Files folder image Files (194)  /  tests  /  Unit  
File Role Description
Files folder imageDiff (2 files)
Files folder imageDoctor (7 files, 2 directories)
Files folder imageExport (7 files)
Files folder imageIntrospection (2 files)
Files folder imageTheme (1 file)

  Files folder image Files (194)  /  tests  /  Unit  /  Diff  
File Role Description
  Accessible without login Plain text file PurityTest.php Example Example script
  Accessible without login Plain text file SchemaDifferTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Unit  /  Doctor  
File Role Description
Files folder imageFormatters (2 files)
Files folder imageRules (13 files)
  Accessible without login Plain text file CategoryTest.php Example Example script
  Accessible without login Plain text file DoctorReportTest.php Example Example script
  Plain text file DoctorRunnerTest.php Class Class source
  Accessible without login Plain text file FindingCollectionTest.php Example Example script
  Accessible without login Plain text file FindingTest.php Example Example script
  Accessible without login Plain text file RuleRegistryTest.php Example Example script
  Accessible without login Plain text file SeverityTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Unit  /  Doctor  /  Formatters  
File Role Description
  Accessible without login Plain text file ConsoleFormatterTest.php Example Example script
  Accessible without login Plain text file JsonFormatterTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Unit  /  Doctor  /  Rules  
File Role Description
  Accessible without login Plain text file BooleanAsStringTest.php Example Example script
  Accessible without login Plain text file DuplicateIndexTest.php Example Example script
  Accessible without login Plain text file ForeignKeyTypeMismatchTest.php Example Example script
  Accessible without login Plain text file ForeignKeyWithoutIndexTest.php Example Example script
  Accessible without login Plain text file IndexDuplicatingPrimaryKeyTest.php Example Example script
  Accessible without login Plain text file LikelyMissingForeignKeyTest.php Example Example script
  Accessible without login Plain text file MissingPrimaryKeyTest.php Example Example script
  Accessible without login Plain text file MissingUniqueConstraintTest.php Example Example script
  Accessible without login Plain text file MoneyAsFloatTest.php Example Example script
  Accessible without login Plain text file PivotWithoutUniqueKeyTest.php Example Example script
  Accessible without login Plain text file PolymorphicWithoutIndexTest.php Example Example script
  Accessible without login Plain text file RedundantPrefixIndexTest.php Example Example script
  Accessible without login Plain text file UnindexedSoftDeleteTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Unit  /  Export  
File Role Description
  Accessible without login Plain text file CrossCheckTest.php Example Example script
  Accessible without login Plain text file DbmlGeneratorTest.php Example Example script
  Accessible without login Plain text file DeterminismTest.php Example Example script
  Accessible without login Plain text file JsonCsvGeneratorTest.php Example Example script
  Accessible without login Plain text file MarkdownGeneratorTest.php Example Example script
  Accessible without login Plain text file MermaidGeneratorTest.php Example Example script
  Plain text file SchemaExporterTest.php Class Class source

  Files folder image Files (194)  /  tests  /  Unit  /  Introspection  
File Role Description
  Accessible without login Plain text file PurityTest.php Example Example script
  Accessible without login Plain text file SchemaSerializerTest.php Example Example script

  Files folder image Files (194)  /  tests  /  Unit  /  Theme  
File Role Description
  Accessible without login Plain text file ThemeStylesheetTest.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0