Download the PHP package joaovdiasb/laravel-multi-tenancy without Composer
On this page you can find all versions of the php package joaovdiasb/laravel-multi-tenancy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joaovdiasb/laravel-multi-tenancy
More information about joaovdiasb/laravel-multi-tenancy
Files in joaovdiasb/laravel-multi-tenancy
Package laravel-multi-tenancy
Short Description Laravel multi-tenancy package
License MIT
Informations about the package laravel-multi-tenancy
Laravel multi-tenancy databases
Installation
Install via composer
Configuration
-
Publish provider and migrate:
- Add env variable
TENANT_ENCRYPT_KEY
with 32 random characters string.
Usage
- Add middleware multitenancy on the routes that you need;
- Send X-Ref header on request with tenant reference, defined on tenants table.
Commands
- Add tenant:
{reference?} Used to pass on request header to identify tenant
All params are optional, if not present, will be asked on console
- Migrate tenant:
{tenant?} Select tenant by id, if not present, all tenants are selected
{--fresh} Is present, will drop all tables from the database
{--seed} Is present, call seeds
- Seed tenant:
{tenant?} Select tenant by id, if is not present, all tenants are selected
*{--class=}** Is required, specify class name
- Backup tenant:
{tenant?} Select tenant by id, if is not present, all tenants are selected
Testing
Run the tests with:
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.