orchestra/workbench
Orchestra Workbench helps you preview and interact with your Laravel package during development. Spin up a local app environment to test routes, views, migrations, and configuration while building and validating your package before release.
DatabaseSeeder, UserFactory) to generate boilerplate, reducing merge conflicts and allowing developers to focus on package logic. This aligns well with modular Laravel development where packages are treated as independent units.Orchestra\Canvas\Core\Actions) suggest a shift toward declarative, reusable actions (e.g., WriteEnvironmentVariables, ReplaceNamespaces), which can be extended for custom workflows. This fits modern Laravel’s emphasis on modularity and composability.php artisan workflows. Example:
php artisan workbench:install
php artisan workbench:serve
php artisan workbench:test
testbench.yaml, UserFactory) to match project-specific conventions, reducing friction for teams with unique requirements.TESTBENCH_USER_MODEL, enabling flexibility in multi-package or multi-tenant setups.workbench.php config to avoid losing changes during updates.--memory=4G or containerize Workbench for heavy workloads.workbench:test as a pre-merge check), or will it remain optional?ServiceProvider::booted().workbench:* commands.DatabaseSeeder, UserFactory).new Collection(), named arguments), so PHP version alignment is critical.composer.json workflows.composer require orchestra/workbench --dev
php artisan workbench:install
composer create-project scripts).- name: Test with Workbench
run: php artisan workbench:test
| Component | Compatibility Notes |
|---|---|
| Laravel 10–13 | ✅ Full support (tested in releases). |
| Laravel <10 | ⚠️ May require backporting or forking (e.g., ServiceProvider::booted() changes). |
| PHP 8.5+ | ✅ Required for modern syntax (e.g., new Collection()). |
| PHP <8.5 | ⚠️ May need polyfills or Workbench forking. |
| Custom User Models | ✅ Supported via TESTBENCH_USER_MODEL env variable. |
| Custom Database Schemas | ⚠️ May require stub overrides or Workbench extension. |
| Vite/Livewire | ✅ Works for frontend previews (if package includes assets). |
| Docker/Containerized | ✅ Can run in-process or containerized (e.g., Laravel Sail). |
| Monolithic Apps | ⚠️ Risk of namespace collisions; prefer for package isolation. |
UserFactory, DatabaseSeeder).php artisan workbench:install in the package root..env for TESTBENCH_USER_MODEL if using custom auth.config/workbench.php or via workbench:publish.php artisan workbench:serve && artisan [package:command].php artisan workbench:test to pipeline scripts.composer install --optimize-autoloader) to speed up builds.How can I help you explore Laravel packages today?