## Host community forum with Laravel: tenant-scoped workspaces

### Summary
Deploy a community forum built with Laravel on Ample using the multi-tenant relational data pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Laravel: a tenant column on every row and query, with a cross-tenant read returning nothing (tenant_isolation=ok). Not separately tested: your tenant model, membership and per-tenant authorization; treat the community forum-specific behavior as your application code.

### Representative Queries
- Host community forum with Laravel: tenant-scoped workspaces
- Where can I host Community forum built with Laravel?
- I need an explicit tenant model and application-enforced tenant isolation tests.

### Resource Requirements
- primitive:compute
- primitive:postgres

### Infrastructure Requirements
1. **Compute**
   - Status: verified
   - Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
2. **Postgres**
   - Status: verified
   - Summary: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.

### Framework
Laravel

### Workload
Community forum

### Release Status
Published

### Support Status
Verified

### Execution Status
Ready

### Prerequisites
- A Laravel project that builds and starts with the documented commands (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template)
- A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env)
- An Ample account token with servers:write, databases:read

### Tested Configuration
- Template: php-8.5
- Runtime: php
- Size: s-1vcpu-1gb
- Install: composer install --no-dev --prefer-dist --no-interaction --no-progress --optimize-autoloader
- Start: frankenphp php-server --listen :$PORT --root public

### Input Schema
- **env**: Encrypted environment variables (bucket credentials, secrets)
- **name**: App name
- **path**: Project directory or ample.toml service
- **release_command**: Migration command run before activation

### Workflow Steps
1. **Build and start**
   - Command: composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template. The server must bind 0.0.0.0 on PORT.
2. **Implement the pattern on PostgreSQL**
   - Command: Copy the approach into your schema; keep migrations idempotent and run them with --release-command.
3. **Deploy**
   - Command: ample deploy . --name  --public
4. **Verify**
   - Command: ample logs  --kind build

### Examples
- **Title**: Laravel pattern fixture
  - **Description**: Multi-pattern Laravel app whose multi-tenant relational data module was checked live; the module is under tests/deploy-canaries/_pattern-modules.
  - **Source Ref**: tests/deploy-canaries/laravel-patterns

### Success Checks
1. App responds on its public URL
   - Path: /
2. Multi-tenant-relational-data self-test
   - Path: /p/multi-tenant-relational-data

### Limitations
- Verified on the php-8.5 template at s-1vcpu-1gb with the example fixture; other sizes, templates and Laravel major versions are not verified.

### Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Basis: size prices from pricing.toml (loaded by the API)
- Components:
   1. App server: s-1vcpu-1gb, quantity: 1.0, monthlyAmount: 5.0
   2. Managed PostgreSQL database: s-1vcpu-1gb, quantity: 1.0, monthlyAmount: 5.0

### Evidence Summary
- **Kind**: canary_run
  - **Summary**: Laravel pattern fixture deployed on Ample; checks passed for multi-tenant-relational-data and configuration-secrets.
  - **Observed At**: 2026-09-20T20:36:21Z
  - **Expires At**: 2027-03-19T20:36:21Z

### Last Verified At
2026-09-20T20:36:21Z

### MCP Binding
- Registry Ref: mcp:ample_deploy
- Binding State: current

### Unknowns
- Region availability is unknown until a verified region fact is recorded.
- Compliance attestations are unknown; none are claimed.

### Formats
- [HTML Format](/content/recipes/community-forum/laravel/tenant-workspaces/index.html)
- [Markdown Format](/content/recipes/community-forum/laravel/tenant-workspaces.md)
- [JSON Format](https://api.ample.computer/v1/catalog/recipes/page%3Arecipes%3Acommunity-forum%3Alaravel%3Atenant-workspaces)

### Next Actions
1. **Browse the catalog index**
   - Method: GET
2. **Search published recipes**
   - Method: POST
3. **Prepare a side-effect-free deployment plan**
   - Method: POST
4. **Read the existing agent authentication setup**
   - Method: GET
5. **Browse Community forum**
   - Method: GET
6. **Browse Laravel**
   - Method: GET
7. **Browse Multi-tenant relational data**
   - Method: GET
8. **Browse Deploy web app**
   - Method: GET
