A flexible multi-tenancy package for Laravel. Single & multi-database tenancy, automatic & manual mode, event-based architecture. Integrates perfectly with other packages. stancl/tenancy is a flexible multi-tenancy Laravel package that comes with lots of features out-of-the-box and doesn't stand in your way when you need anything custom. Instead of forcing you to change how you write your code, the package by default bootstraps tenancy automatically, in the background. Database connections are switched, caches are separated, filesystems are prefixed, etc. Out of the box, the package makes the following things tenant-aware: databases, caches, filesystems, queues, redis stores. This means that if you've already written your app and are looking to make it multi-tenant, you don't have to change anything.
Features
- Automatic data separation
- Integrates with other packages
- Fully testable
- Extreme flexibility
- Event-based architecture
- Single or multi-database tenancy
- Manual tenancy
- Shared users between tenants
- User impersonation
- Works with any database