sbine/simple-tenancy
Simple multi-tenancy for Laravel: add a trait to scope Eloquent models to the current tenant, with automatic query filtering and tenant-aware model creation. Lightweight and straightforward, it's ideal for apps that need clean tenant isolation without per-tenant databases.
withoutGlobalScopes, admin paths, queued jobs, commands, and long-running workers/Octane. Secondary risks include package abandonment, Laravel upgrade breakage, and incomplete cache/session/storage isolation.tenant_id to tenant-owned tables, backfill a default tenant, apply package traits/scopes to models, add middleware/resolver from authenticated user/domain, and wrap tenant context boundaries. Avoid a big-bang migration; phase by bounded context and keep a feature flag and rollback path.tenant_id is indexed and query plans are monitored. Watch noisy-neighbor tenants, large-table growth, reporting queries, and future sharding needs. It does not provide strong isolation or per-tenant restore.tenant_id, raw SQL, cache/session/storage key collisions, queue serialization of tenant context, long-running worker leakage, and package incompatibility after Laravel upgrades. The highest-severity failure is cross-tenant data exposure.How can I help you explore Laravel packages today?