# Console
There are two sets of commands bundled with the package: tenancy
and tenants
# Tenancy Commands
Tenancy commands manage the package by default. They are:
tenancy:setup
: Used for setting up the packagetenancy:model
: Used for creating models specifically for tenantstenancy:migration
: Used for creating tenant specific migrationstenancy:users
: Used for creating the tenant user migration file
# Tenants Commands
These are used for setting up a tenant. They simplify most of the work done when a tenant is created.
They handle operations like migrating a tenants database, seed it, rollback migrations and more.
The included commands are:
tenants:migrate
: Used to run tenant migrationstenants:seed
: Used to seed tenant databasestenants:rollback
: Rollback tenant migrationstenants:refresh
: Reset and re-run all tenant migrationstenants:reset
: Rollback all database migrations for tenants
You can define your own tenant based commands and the register them in the console
option of config.
The accepted commands are:
# migrator
These are migration based commands. Basically they deal with the database schema.
The command should accept instances of:
Illuminate\Database\Migrations\Migrator
andMiracuthbert\Multitenancy\Database\TenantDatabaseManager
# db
These are commands that interact with the database records such as tenants:seed
command.
The command should accept instances:
Illuminate\Database\ConnectionResolverInterface
andMiracuthbert\Multitenancy\Database\TenantDatabaseManager
← Configuration Drivers →