0057-laravel-multi-tenancy
CommunityIsolate tenants and scope data automatically.
Software Engineering#multi-tenancy#testing strategy#laravel#tenant isolation#queued jobs#tenant scoping#stancl tenancy
AuthorMrJmpl3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It solves the complexity of building multi-tenant Laravel applications by keeping central (non-tenant) and tenant-scoped (tenanted) logic separated while ensuring queries and background jobs run in the correct tenant context.
Core Features & Use Cases
- Central vs Tenanted organization: Separate actions and DTOs for tenant management and tenant-specific business logic.
- Tenant-aware data access: Ensure tenant scoping is applied to queries so models do not require explicit tenant_id handling.
- Tenant context-safe background jobs: Preserve tenant context when dispatching queued jobs using tenant-aware job patterns.
- Tenant identification and routing: Initialize tenancy by domain, subdomain, or request header, and route requests to central or tenant handlers.
- Testing support for both contexts: Provide test infrastructure that creates isolated tenant databases, manages transactions, and runs correct base test cases by directory.
Quick Start
Use the 0057-laravel-multi-tenancy skill to structure your Laravel project for Stancl Tenancy with central/tenanted actions, tenant-aware jobs, and directory-based test setup.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0057-laravel-multi-tenancy Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0057-laravel-multi-tenancy Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.