
A simple, single database multi-tenancy solution for Laravel 5.2+
Landlord is a powerful multi-tenancy package designed specifically for Laravel and Lumen 5.2+, making it an essential tool for developers looking to build multi-tenant applications. With its stateless approach, Landlord simplifies the process of managing multiple tenants within a single database. Whether you're creating an application for a startup or expanding an existing project, Landlord provides the necessary features to ensure each tenant's data remains secure and isolated.
The installation and configuration process is straightforward, making it easy for developers to integrate into their applications. With a focus on simplicity and clarity, Landlord helps you manage tenant-specific data efficiently without compromising performance. This package is a game changer for anyone working with multi-user platforms.
Stateless Operation: Landlord operates statelessly, ensuring that tenant scoping is only applied during the current request. This enhances performance and reduces overhead.
Automatic Scoping: By utilizing the BelongsToTenants trait, models automatically scope queries to the relevant tenant, offering a seamless data management experience.
Flexible Tenant Management: Add or remove tenants easily using addTenant() and removeTenant() methods, allowing dynamic control over which tenant data is being accessed.
Error Handling: Landlord catches ModelNotFound exceptions and rethrows them as ModelNotFoundForTenantException, providing clearer error messages when querying across tenants.
Customizable Tenant Columns: Set specific tenant columns per model using the $tenantColumns property for greater control over data organization.
Global Scoping: Utilize Laravel's anonymous global scope to manage tenant-specific queries, ensuring that data retrieval is both secure and efficient.
Support for Multiple Tenants: Manage multiple tenants simultaneously, while ensuring that each tenant's data integrity remains intact throughout the application lifecycle.
Easy Installation: The package can be easily integrated into Laravel or Lumen projects with straightforward setup instructions in the configuration files.
