Skip to content

Entity Diagram & Sidebar

The entity diagram

A canvas view of every generated entity and how they relate.

Entity diagram

  • Relationship links are smooth Bezier curves anchored to the nearest card edge, with arrowheads and cardinality labels in readable pills.
  • Hovering a card highlights its connections; inverse declarations (Post hasMany Comment + Comment belongsTo Post) are merged into a single link; self-referential relations render as a small loop.
  • The canvas is infinite: drag or scroll to pan across the dotted grid in any direction. Ctrl+wheel zooms toward the cursor, and cards stay draggable at any zoom. The toolbar has −/+/100%/Fit.

The sidebar home

The activity bar view opens on a home panel, so every way to generate is one click away.

  • New API opens the visual builder.
  • Generate from lists the other sources: existing database, schema file, Mermaid diagram.
  • Explore jumps to the entity diagram, the snippets picker and this documentation.

The panel follows your VS Code theme and the extension's language setting (English or French).

The sidebar explorer

Below it, the Generated Entities view tracks everything the generator created.

Sidebar explorer

Each entity expands into three groups:

  • Files: a green check / red slash per artifact (Model, Controller, Service…); click to open.
  • Fields: read from the model's $fillable.
  • Relations: extracted from the model's relation methods, shown as belongsTo → Author.

A file watcher keeps the tree and the status bar in sync when APIs are generated or deleted outside the extension, from the terminal or after a git pull.

Entity actions

Right-click (or use the inline icons) on any entity:

  • Add Fields to Entity…: type excerpt:text,status:enum(draft,published) and the package creates an incremental migration and patches the model, request, factory and resource in place via --add-fields, with one click to run the migration after. See Evolving Entities.
  • Regenerate File(s)…: the extension parses the existing migration to recover the field list, then lets you multi-select which artifacts to rebuild. The underlying call is make:fullapi --only=…, so the migration, route and seeder registration are left untouched.
  • Delete: full cleanup via delete:fullapi (files, routes, seeder registration).

Ctrl+Alt+R (Cmd+Alt+R on macOS) from any generated file jumps to its siblings (model to controller to service to test) without hunting through the tree.