# laravel-tenanted > Structural multi-tenancy (database-per-tenant) for Laravel for Rust (`laravel-rust 0.2`). Every customer gets an isolated database with vanilla `laravel-rust` models, fail-closed safety, and zero `tenant_id` columns on tenant tables. - Crate: https://crates.io/crates/laravel-tenanted - Docs: https://tenanted.dev - Full LLM reference: https://tenanted.dev/llms-full.txt - GitHub: https://github.com/cole-robertson/laravel-tenanted - Live Demo: https://demo.tenanted.dev - Agent Skill: `npx skills@latest add cole-robertson/laravel-tenanted --skill laravel-tenanted` ## Quick Install ```sh cargo add laravel-tenanted # Optional: durable SQLite on S3 / Cloudflare R2 / Laravel Cloud Object Storage cargo add laravel-litebucket ``` ## Guides - [Getting Started & Architecture](https://tenanted.dev/docs/getting-started/): Why SQLite makes database-per-tenant practical, how `DatabaseManager::using_connection` + `laravel::context` + fail-closed `require_tenant()` work, and strict tenant ID validation. - [Configuration Reference & Real-World Recipes](https://tenanted.dev/docs/configuration/): All `TENANT_*` env vars, all 27 `TenancyBuilder` methods, Laravel Cloud + LiteBucket auto-setup, custom customer domains, Postgres schema-per-tenant, and shadcn UI SDK starter kit setup. - [Tenant Resolution & Routing](https://tenanted.dev/docs/resolution-and-routing/): Subdomains + `TrustHosts`, headers, sessions, custom `resolve_tenant`, `Tenant` / `Option` extractors, Route Model Binding, per-tenant validation, typed errors. - [Models, Migrations & Central Data](https://tenanted.dev/docs/models-migrations-and-central/): `#[model(connection = "central")]`, `without_tenant`, `run`, `for_each`, Blueprint migrations, LRU pooling, lifecycle hooks, 5 `tenant:*` Artisan commands. - [Queues, Cache, Storage, Events & Testing](https://tenanted.dev/docs/queues-cache-and-events/): `TenantQueueMiddleware`, `laravel::context` logs, `"tenanted"` cache store, `TenantedStorage`, lifecycle events, `TempTenants` parallel testing. - [Inertia + React Org Switcher](https://tenanted.dev/docs/inertia-org-switcher/): Full `.session("active_org")` org switcher + Super Admin inspection recipe. - [Deployment Guide](https://tenanted.dev/docs/deployment/): Laravel Cloud + LiteBucket auto-setup, Docker/VPS, Fly.io, wildcard TLS, backups, GDPR offboarding.