Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Awesome Landlord

Awesome Landlord Laravel Package

torzer/awesome-landlord

torzer/awesome-landlord is a Laravel package for multi-tenant applications with a landlord/tenant architecture. It helps manage tenants, isolate databases, route by domain or subdomain, and switch tenant contexts, making SaaS and multi-tenant Laravel apps easier to build.

View on GitHub
Deep Wiki
Context7

A simple, single database multi-tenancy solution for Laravel 5.2+

Frequently asked questions about Awesome Landlord
What is torzer/awesome-landlord used for?
torzer/awesome-landlord is a Laravel package for single-database multi-tenancy using a landlord/tenant model. It targets Laravel 5.2+ and is intended for lightweight logical separation, where tenant-aware Eloquent models and scopes filter shared tables by a tenant identifier. It also supports tenant resolution and routing by domain or subdomain. It is not designed for physical database isolation or strict regulatory separation.
Is torzer/awesome-landlord compatible with Laravel 9, 10, or 11?
The package targets Laravel 5.2 and was archived in 2020, so it does not officially cover Laravel 9, 10, or 11. Composer constraints will likely block current Laravel versions, and PHP 8 compatibility is not guaranteed. Expect to fork and modernize it if you need a current stack. For greenfield projects, use a maintained alternative instead.
How does torzer/awesome-landlord isolate tenant data?
It uses a shared database and tenant-aware Eloquent traits or global scopes to add tenant_id-style filtering to queries. Request-level middleware resolves the current tenant and sets the context used by models. This is logical isolation only, so raw SQL, query builder calls, and third-party packages can bypass the scopes. Every tenant-scoped table and query path must be reviewed.
How do I install and configure torzer/awesome-landlord in Laravel?
A typical integration requires Composer installation, schema changes to add tenant identifiers, model trait adoption, tenant resolver middleware, and updated tests. The archived package may need a fork with pinned Laravel and PHP constraints before it installs on a modern app. Start with a proof of concept covering all tenant data models and query paths. Do not treat a successful install as proof of isolation.
Can I route tenants by domain or subdomain with this package?
Yes, domain and subdomain tenant routing is part of the intended landlord/tenant architecture. You still need middleware or resolver logic to map the incoming host to the correct tenant and set the context for Eloquent scopes. Test routing across all hosts, including www and API subdomains. Ensure unmatched or unknown domains fail closed rather than falling back to a default tenant.
Does torzer/awesome-landlord work with queued jobs and console commands?
Tenant context does not automatically propagate to queued jobs, events, scheduled commands, or console commands. You must explicitly pass or rehydrate the tenant identifier and set the tenant context inside each job or command. Without that, queued work can run unscoped or against the wrong tenant. Add leak tests for every asynchronous path.
Is single-database multi-tenancy with this package safe for production?
It can be acceptable for low-risk, Eloquent-centric applications that accept shared-schema tenancy. It is a poor fit for regulatory isolation, per-tenant encryption, or any workload with raw SQL and non-Eloquent data paths. Because one missing scope can expose all tenants, production use requires leak tests, monitoring, and strict query review. The package is archived, so you also own security and compatibility maintenance.
What are alternatives to torzer/awesome-landlord for Laravel multi-tenancy?
Maintained alternatives include stancl/tenancy and spatie/laravel-multitenancy, which are better choices for modern Laravel applications. You can also extract the core pattern internally: tenant resolver middleware, tenant_id columns, global scopes, tenant-aware jobs, and leak tests. For legacy Laravel 5.2 to 7 apps already committed to shared-database tenancy, this package may serve as a reference. For greenfield work, avoid depending on an archived package.
How should I test for cross-tenant data leaks with this package?
Build automated tests that create at least two tenants and assert that tenant A cannot read, update, or delete tenant B records through every model and endpoint. Include tests for raw SQL, query builder usage, APIs, jobs, events, console commands, cache, and file storage paths. Use a fail-closed resolver and test unknown domains and missing tenant context. Run these leak tests in CI and repeat them after every Laravel or PHP upgrade.
Is torzer/awesome-landlord still maintained, and should I fork it?
No, torzer/awesome-landlord has been archived since 2020, has a small community footprint, and has no upstream support or vendor SLA. If you use it, fork it, pin compatible Laravel and PHP constraints, add tests, and document an exit path to a maintained solution. Budget ongoing maintenance because tenancy bugs are high severity. For most teams, a maintained package or an internal implementation is the safer choice.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings