Laravel Tenancy is a package by Daniël Klabbers, Paulo Trajano, and Bertrand Kintanar, for making your Laravel application multi-tenant:
The unobtrusive Laravel package that makes your app multi-tenant. Serving multiple websites, each with one or more hostnames from the same codebase. But with clear separation of assets, database and the ability to override logic per tenant.
Suitable for marketing companies that like to re-use functionality for different clients or start-ups building the next software as a service.
The Laravel Tenancy package includes the following features:
- Integration with the Laravel framework
- Event-driven extensible architecture
- Close – optional – integration into the web server
- The ability to add tenant-specific configs, code, routes, etc.
A couple of standard approaches to database architecture in multi-tenant applications include:
- One database for system data and tenants’ tables are prefixed
- One database for system data and separate tenant databases
Laravel Tenancy supports both methods, and you can manually customize it the way you want through event listeners.
The tenancy/tenancy package is the successor to hyn/multi-tenant, which means if you want to use this in production you’d probably use the
hyn/multi-tenant package as
tenancy/tenancy is still a work in progress.
The documentation for hyn/multi-tenant is an excellent place to start learning about Tenancy for requirements, installation, and implementation details.
Filed in: Laravel Packages
Join the weekly newsletter and never miss out on new tips, tutorials, and more.
- Mid / Sen. Software Engineer
- Remote PHP / Laravel Developer
- Senior PHP/Laravel Developer: Your Dream Work Environment
iPhone Photography School
- Senior Laravel Developer
- PHP Developer
- Senior Laravel Developer (Canada and India)
London, Ontario, Canada
Factory Bucket Inc.
- Laravel, PHP, PostgreSQL, Neo4J Developer
Pune, India (intern in Denver, CO)
Built with Jigsaw – the Ultimate Showcase of Web Sites Built with Jigsaw
“Built with Jigsaw” is a gallery of websites made with Jigsaw, and includes helpful articles about using…
PHPConsole is a Programming and Live Coding Companion
PHPConsole is a neat Windows desktop application GUI for writing, reading, and executing PHP code by Josiah Ovye Yaha…