mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-15 00:04:04 +00:00
uuid -> id (references in code)
This commit is contained in:
parent
a7bb709bd4
commit
79f912384b
17 changed files with 46 additions and 45 deletions
|
|
@ -66,7 +66,7 @@ class Install extends Command
|
|||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return 'This is your multi-tenant application. The uuid of the current tenant is ' . tenant('uuid');
|
||||
return 'This is your multi-tenant application. The id of the current tenant is ' . tenant('id');
|
||||
});
|
||||
"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class Migrate extends MigrateCommand
|
|||
}
|
||||
|
||||
tenant()->all($this->option('tenants'))->each(function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})");
|
||||
$this->line("Tenant: {$tenant['id']} ({$tenant['domain']})");
|
||||
|
||||
// See Illuminate\Database\Migrations\DatabaseMigrationRepository::getConnection.
|
||||
// Database connections are cached by Illuminate\Database\ConnectionResolver.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Rollback extends RollbackCommand
|
|||
$this->input->setOption('database', 'tenant');
|
||||
|
||||
tenant()->all($this->option('tenants'))->each(function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})");
|
||||
$this->line("Tenant: {$tenant['id']} ({$tenant['domain']})");
|
||||
$this->database->connectToTenant($tenant);
|
||||
|
||||
// Migrate
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Run extends Command
|
|||
}
|
||||
|
||||
tenant()->all($this->option('tenants'))->each(function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})");
|
||||
$this->line("Tenant: {$tenant['id']} ({$tenant['domain']})");
|
||||
tenancy()->init($tenant['domain']);
|
||||
|
||||
$callback = function ($prefix = '') {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class Seed extends SeedCommand
|
|||
$this->input->setOption('database', 'tenant');
|
||||
|
||||
tenant()->all($this->option('tenants'))->each(function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})");
|
||||
$this->line("Tenant: {$tenant['id']} ({$tenant['domain']})");
|
||||
$this->database->connectToTenant($tenant);
|
||||
|
||||
// Seed
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class TenantList extends Command
|
|||
{
|
||||
$this->info('Listing all tenants.');
|
||||
tenancy()->all()->each(function ($tenant) {
|
||||
$this->line("[Tenant] uuid: {$tenant['uuid']} @ {$tenant['domain']}");
|
||||
$this->line("[Tenant] id: {$tenant['id']} @ {$tenant['domain']}");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue