What this request can see
You are inside Quill & Ledger. The global scope adds tenant_id = 1042 to every query.
| Model | Query | Rows | From other tenants |
|---|---|---|---|
| Member | Member::count() | 9 | 0 |
| Project | Project::count() | 14 | 0 |
| Invoice | Invoice::count() | 6 | 0 |
| ApiToken | ApiToken::count() | 2 | 0 |
| ActivityEntry | ActivityEntry::count() | 37 | 0 |
Same account, other workspaces — different answers
QL
Quill & Ledger tenant_id 1042
9 members · 14 projects · 6 invoices
SF
Saltmarsh Freight tenant_id 1188
5 members · 6 projects · 0 invoices
Try to cross the boundary
Four requests a curious or careless piece of code might make. Target: Fernhill Clinics (tenant 1017).
tinker · tenant 1042waiting
// pick one of the four attempts above// each runs as Tomas Reyes inside Quill & Ledger
php artisan test --testsuite=TenancyPASSED
Tests58 passed
Cross-tenant rows read0
Query without a tenantEmpty
The same attempts, kept as tests. How the scope is written · Open their invoice URL directly
Tenant scope on. Every query for this page ran with
tenant_id = 1042 — rows read from other tenants: 0.
Try to cross the boundary