## Host appointment booking with Laravel: relational workflow state

Deploy a appointment booking built with Laravel on Ample using the transactional workflows 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: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). Not separately tested: your domain records, validation rules and concurrency policy; treat the appointment booking-specific behavior as your application code.

### Summary
- **Framework**: Laravel  
- **Workload**: Appointment booking  
- **Release Status**: published  
- **Support Status**: verified  
- **Execution Status**: ready

### Representative Queries
1. Host appointment booking with Laravel: relational workflow state
2. Where can I host Appointment booking built with Laravel?
3. I need a domain record schema, validation rules and concurrency behavior.

### Resource Requirements
- **Primitive**: Compute  
- **Primitive**: Postgres

### Workflow Steps
1. **Build and start**  
   - `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**  
   - The fixture's module implements transactional workflows: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). Copy the approach into your schema; keep migrations idempotent and run them with --release-command.  
3. **Deploy**  
   - `ample deploy . --name --public`  
4. **Verify**  
   - `ample logs --kind build` then `--kind runtime`

### 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.
- The appointment booking itself (your domain records, validation rules and concurrency policy) is application code and was not separately tested; the pattern checks are what was verified.
- Region, compliance attestations and request-duration limits are unknown and not claimed.
- Apps auto-pause when idle and wake on the next request.

### Success Checks
1. App responds on its public URL:
   - Kind: http_get  
   - Path: /  
   - Expect: ample canary laravel patterns  
2. Transactional-workflows self-test:
   - Kind: http_get  
   - Path: /p/transactional-workflows  
   - Expect: tx=ok history=2 conflict=rejected

### Cost Estimate
- **Currency**: USD  
- **Monthly Amount**: 10.0  
- **Basis**: size prices from pricing.toml
- **Components**:
  - Name: app server
    - Size: s-1vcpu-1gb
    - Quantity: 1.0
    - Monthly Amount: 5.0
  - Name: managed PostgreSQL database
    - Size: s-1vcpu-1gb
    - Quantity: 1.0
    - Monthly Amount: 5.0

### Input Schema
```json
{
  "additionalProperties": false,
  "properties": {
    "env": {
      "description": "Encrypted environment variables (bucket credentials, secrets)",
      "items": {
        "pattern": "^[A-Z][A-Z0-9_]*=.*$",
        "type": "string"
      },
      "maxItems": 50,
      "type": "array"
    },
    "name": {
      "description": "App name",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9-]+$",
      "type": "string"
    },
    "path": {
      "description": "Project directory or ample.toml service",
      "maxLength": 512,
      "minLength": 1,
      "type": "string"
    },
    "release_command": {
      "description": "Migration command run before activation",
      "maxLength": 512,
      "type": "string"
    }
  },
  "required": ["name", "path"],
  "type": "object"
}
```

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