orchestra/canvas
Orchestra Canvas brings Laravel’s artisan make code generators to apps and packages. Use familiar make:* commands outside a Laravel install or with customizable namespaces and stubs, speeding scaffolding for controllers, models, migrations, and more.
canvas.yaml presets, allowing teams to enforce project-specific naming conventions (e.g., monorepo namespaces like Company\ServiceA\Models\).composer require --dev orchestra/canvas). The LaravelServiceProvider automatically overrides Artisan commands without manual configuration.canvas.yaml preset system allows custom path/namespace mappings (e.g., src/, PackageName\Console).composer exec canvas to bypass overrides or audit existing make:* commands.Illuminate\Console\MigrationGeneratorCommand). Risk for older Laravel apps (v10 or below). Mitigation: Use a pinned version (e.g., orchestra/canvas:9.x for Laravel 10).canvas.yaml presets for non-standard setups. Mitigation: Provide team workshops or internal docs on preset configuration.Laravel Version Alignment:
Namespace/Path Strategy:
Company\ServiceA\Models\) via canvas.yaml?app/Modules/) that require custom stubs?Package Development Needs:
Toolchain Integration:
Maintenance Plan:
canvas.yaml presets if team conventions change?Adoption Barriers:
canvas.yaml setup for existing projects?)orchestra/canvas:9.x (last version supporting Laravel 10).MigrationGeneratorCommand).orchestra/canvas-core (minimal dependency).Pilot Phase (1–2 Weeks):
make:model, make:migration, make:controller).canvas.yaml tweaks needed.Team Adoption:
make:model --migration with canvas make:model Post -m).canvas.yaml presets for monorepos/packages.Full Rollout:
composer.json across projects:
"require-dev": {
"orchestra/canvas": "^11.0"
}
canvas.yaml is version-controlled and validated in pipelines.make:* commands by default. To avoid conflicts:
composer exec canvas for standalone mode.resources/stubs/ (Canvas auto-detects these).CanvasServiceProvider to modify stub resolution.canvas.yaml:
preset: package
namespace: Company\ServiceA
paths:
src: src/Models
migration: database/migrations/custom
Phase 1: Core Commands (Week 1):
make:model, make:migration, make:controller, make:job.Phase 2: Package Development (Week 2):
canvas.yaml for package-specific paths (e.g., src/Console).Phase 3: Advanced Features (Week 3+):
make:enum, make:interface, make:job-middleware.Phase 4: IDE/Toolchain Sync:
app/Models/User.php creation).canvas.yaml presets handle 90% of use cases.^11.0) to avoid breaking changes.canvas.yaml and --namespace flags.resources/stubs/ for overrides.Orchestra\Canvas\LaravelServiceProvider is registered.How can I help you explore Laravel packages today?