Packstub

Filament Tenancy

Multi-database tenancy for Filament v5 panels, powered by stancl/tenancy v4. One login on your central domain, a workspace per tenant on its own subdomain or custom domain, and every tenant on its own database — no tenant_id columns, no global scopes. Scale across any number of database servers when you need to.

  • Installation — add the registry, require the package, run the installer, register the plugin. Five minutes.
  • Quickstart — create your first tenant through the onboarding wizard and land in its panel.
  • Live demo — two provisioned tenants, each on its own database; the login is pre-filled. Source on GitHub.

What you get

Feature What it means for you
One plugin line ->plugin(TenancyPlugin::make()) wires the tenant model, routing, switcher, onboarding wizard, and provisioning status page. No stancl middleware to add.
Isolated by connection Tenant tables live in the tenant's database. Your models and resources stay exactly as in a single-tenant app.
Queued provisioning Create database → migrate → seed → ready, with a polling status page and one-command retry.
Custom domains DNS verification and single-origin login handoff, so app.acme-corp.com works with one line of config.
Horizontal scaling A database pool spreads tenant databases across servers; add a server, add capacity.
Shared or dedicated Database-per-tenant, shared tenant_id scoping (optionally PostgreSQL RLS), or both — per app, even per tenant.

Guides

Guide What it covers
Installation Registry setup, the interactive installer, the User model and panel wiring
Quickstart Your first tenant: the onboarding wizard, provisioning, and the tenant panel
How it works The isolation model, request identification, and the provisioning pipeline
Configuration Complete reference: the annotated config file, the fluent TenancyPlugin API, and stancl's config
Database strategies Dedicated (database-per-tenant), shared (tenant_id, shards, optional PostgreSQL RLS), and hybrid
Custom domains Tenant-owned domains: DNS verification, cross-domain sign-in handoff, logout-everywhere
Horizontal scaling The database pool: spreading tenant databases across multiple servers
Resource syncing Keeping central and tenant copies of a resource in sync
Customizing the UI Publishing views and translations: restyle the waiting room, add a locale
Testing Test helpers and patterns for tenant-aware test suites
Production Queues, Octane, backups, and the go-live checklist
Troubleshooting Common failure modes and how to recover from them

Requirements

PHP 8.4+, Laravel 13, Filament 5. Tenant databases on SQLite, MySQL, MariaDB, PostgreSQL, or SQL Server. stancl/tenancy v4 is installed automatically from the Packstub registry — details.

Help


These pages are published at packstub.dev/docs/filament-tenancy and mirrored read-only on GitHub from the package's docs/ directory. Spotted a mistake? Email support@packstub.dev.