Skip to content

Commands & Settings Reference

Commands

All commands live under the Laravel API Generator category in the command palette (Ctrl+Shift+P). Most are also reachable from the sidebar toolbar and menu.

CommandDescription
Generate Full APIOpen the Entity Builder panel
Generate APIs from DatabaseWhole-schema generation with table multi-select
Generate APIs from Schema FileGenerate from api-schema.yaml / .yml / .json
Generate APIs from Mermaid DiagramGenerate from a .mmd file
Add Fields to Entity…Evolve an entity via --add-fields
Regenerate File(s)…Rebuild selected artifacts via --only=
Delete Full APIRemove an entity's files, routes and seeder registration
Show Entity DiagramOpen the interactive canvas
Show SnippetsList the bundled PHP snippets
Go to Related FileJump between an entity's generated files
Refresh EntitiesRe-scan the project for generated entities

Keybindings

KeysCommand
Ctrl+Alt+R (Cmd+Alt+R on macOS)Go to Related File

Settings

SettingDefaultDescription
laravelApiGenerator.phpPathphpPath to the PHP executable
laravelApiGenerator.localeautoUI language: auto (follow VS Code), en or fr

PHP snippets

Type a lag: prefix in any PHP file:

PrefixExpands to
lag:serviceA full service class (getAll with filtering, create, find, update, delete)
lag:controllerA CRUD controller with service injection
lag:dtoA readonly DTO class with fromRequest()
lag:requestA FormRequest with authorize() and rules()
lag:resourceAn API resource toArray() method
lag:factoryA factory definition() method
lag:test-featureA feature test method skeleton
lag:test-unitA service unit test method skeleton
lag:routeRoute::apiResource(…)
lag:filterA scopeFilter() query scope

Activation

The extension activates when the workspace contains an artisan file: including monorepos where the Laravel app lives up to two levels deep (backend/, apps/api/…).

Changelog

Extension releases are listed on the Changelog page.