After installing roberts/support in your Laravel project or package:
composer require roberts/supportRun the scaffolding command:
composer support:scaffoldThis will:
- Auto-detect if you have a Laravel app or package
- Detect your project's features (Flux, Filament, Twitter API, Mail, etc.)
- Prompt for Google Cloud configuration (apps only)
- Generate and publish all necessary files
To update your scaffolding files to the latest version:
composer support:updateYou'll be prompted for each existing file:
- Skip - Keep current file
- Overwrite - Replace with new version
- Show diff - See what changed
- Backup and overwrite - Save current file with timestamp
GitHub Workflows:
tests.yml- Run PHPUnit/Pest testsphpstan.yml- Static analysislint.yml- Laravel Pint code styledeploy.yml- Google Cloud Run deployment
Docker Files:
Dockerfile- Multi-stage build for Cloud Run.dockerignore- Optimize build contextdocker-entrypoint.sh- Container startup script.gcloudignore- Optimize Cloud builds
Configuration:
phpstan.neon.dist- PHPStan configuration.vscode/settings.json- VS Code workspace settings.vscode/extensions.json- Recommended extensions
GitHub Workflows:
run-tests.yml- Matrix testing (PHP 8.5, Laravel 13)phpstan.yml- Static analysisfix-php-code-style-issues.yml- Auto-fix code style
Configuration:
phpstan.neon.dist- Package-specific PHPStan config
The package automatically detects:
- ✅ Project type (app vs package)
- ✅ Livewire Flux usage
- ✅ Filament usage
- ✅ Twitter/X API integration
- ✅ Mail configuration
- ✅ Queue, cache, session drivers
Templates adapt based on detected features:
- Flux credentials only added if Flux is detected
- Twitter/Mail secrets only included if configured
- Conditional workflow steps based on project needs
Security:
- Non-root Docker user
- Google Secret Manager integration
- GitHub Secrets for sensitive CI/CD data
Performance:
- Multi-stage Docker builds
- OPcache optimization
- Laravel caching (config, routes, events)
- Asset building in CI
Reliability:
- Health checks
- Database migration locking
- Deployment conditionals (DEPLOYMENT_ENABLED flag)
After running composer support:scaffold on an app, follow the checklist:
gh secret set GCP_PROJECT_ID --body="your-project-id"
gh secret set GCP_WORKLOAD_IDENTITY_PROVIDER --body="projects/..."
gh secret set GCP_SERVICE_ACCOUNT --body="github-actions@..."
gh secret set CLOUD_SQL_CONNECTION_NAME --body="project:region:instance"gh variable set DEPLOYMENT_ENABLED --body="true"Create secrets for your Laravel environment:
echo -n "your-app-key" | gcloud secrets create APP_KEY --data-file=-
echo -n "mysql" | gcloud secrets create DB_CONNECTION --data-file=-
# ... etc for all Laravel secrets- Create Artifact Registry repository
- Create Cloud SQL MySQL instance
- Set up Workload Identity Federation
- Configure service account permissions
All templates are Blade files in the package's stubs/ directory. You can:
- Fork the package and modify templates
- Use
composer support:updateto apply changes - Selectively overwrite files as needed
"Context access might be invalid" warnings in VS Code: These are normal - GitHub Actions can't validate secrets that don't exist locally. The workflows will run fine once secrets are added to GitHub.
Docker build fails:
Ensure your .env.example file exists and has all required variables.
Migrations fail on deployment: Check that Cloud SQL connection is configured correctly and the database exists.
- PHP 8.4+
- Laravel 13+
- Git repository with GitHub
- Google Cloud account (for app deployments)
MIT License - see LICENSE.md