laravel-multi-tenancy

Implement multi-tenant Laravel applications with tenant isolation and scoping.

1|Updated May 24, 2026
One-click install
npx skills add https://github.com/PTKDrake/FIT-vmu --skill laravel-multi-tenancy-ptkdrake
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-multi-tenancy
Source: https://github.com/PTKDrake/FIT-vmu/tree/main/.agents/skills/laravel-multi-tenancy
Command: npx skills add https://github.com/PTKDrake/FIT-vmu --skill laravel-multi-tenancy-ptkdrake

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires laravel, stancl/tenancy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides patterns and guidance for implementing multi-tenant architecture in Laravel applications, ensuring data isolation and scalability.

Core Features & Use Cases

  • Tenant Isolation: Ensures data separation between different tenants.
  • Tenant Scoping: Automates the scoping of queries and operations to the current tenant.
  • Queue Integration: Preserves tenant context in queued jobs.
  • Use Case: Ideal for SaaS applications where each customer needs a separate database and strict data isolation.

Quick Start

Initialize the multi-tenant architecture by running the tenant:setup Artisan command.

Frequently Asked Questions about laravel-multi-tenancy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement multi-tenancy in Laravel?

You can implement multi-tenancy in Laravel using architecture patterns for tenant isolation, automated query scoping, and queue integration. This Skill provides guidelines requiring Laravel 8.5 and the Stancl Tenancy package to ensure strict data separation.

What is the best way to ensure data separation between tenants in a Laravel SaaS application?

The best way to ensure data separation between tenants in a Laravel SaaS application is through tenant isolation and automated query scoping. This Skill provides architecture patterns to maintain strict data boundaries for each customer.

Does multi-tenancy in Laravel preserve tenant context in queued jobs?

Yes, multi-tenancy in Laravel can preserve tenant context in queued jobs. This Skill provides queue integration patterns that maintain the current tenant's data separation throughout asynchronous background processing operations.

Do I need the Stancl Tenancy package to set up multi-tenant architecture in Laravel?

Yes, you need the Stancl Tenancy package and Laravel 8.5 to use the architecture patterns provided by this Skill. These dependencies are required to automate tenant scoping and ensure proper data isolation.

How do I initialize a multi-tenant Laravel application?

To initialize a multi-tenant Laravel application, you run the `tenant:setup` Artisan command. This starts the implementation of the architecture patterns for tenant isolation and automated query scoping.