mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
Clean endTenancy() calls at the end of commands
This commit is contained in:
parent
6b103cd2cb
commit
553b162930
5 changed files with 7 additions and 10 deletions
|
|
@ -12,8 +12,7 @@
|
||||||
"require": {
|
"require": {
|
||||||
"illuminate/support": "^6.0",
|
"illuminate/support": "^6.0",
|
||||||
"webpatser/laravel-uuid": "^3.0",
|
"webpatser/laravel-uuid": "^3.0",
|
||||||
"facade/ignition-contracts": "^1.0",
|
"facade/ignition-contracts": "^1.0"
|
||||||
"nesbot/carbon": "^2.0"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"vlucas/phpdotenv": "^3.3",
|
"vlucas/phpdotenv": "^3.3",
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,12 @@ class Migrate extends MigrateCommand
|
||||||
|
|
||||||
// Migrate
|
// Migrate
|
||||||
parent::handle();
|
parent::handle();
|
||||||
|
|
||||||
|
tenancy()->endTenancy();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($originalTenant) {
|
if ($originalTenant) {
|
||||||
tenancy()->initialize($originalTenant);
|
tenancy()->initialize($originalTenant);
|
||||||
} else {
|
|
||||||
tenancy()->endTenancy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,12 @@ class Rollback extends RollbackCommand
|
||||||
|
|
||||||
// Migrate
|
// Migrate
|
||||||
parent::handle();
|
parent::handle();
|
||||||
|
|
||||||
|
tenancy()->endTenancy();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($originalTenant) {
|
if ($originalTenant) {
|
||||||
tenancy()->initialize($originalTenant);
|
tenancy()->initialize($originalTenant);
|
||||||
} else {
|
|
||||||
tenancy()->endTenancy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,6 @@ class Run extends Command
|
||||||
|
|
||||||
if ($originalTenant) {
|
if ($originalTenant) {
|
||||||
tenancy()->initialize($originalTenant);
|
tenancy()->initialize($originalTenant);
|
||||||
} else {
|
|
||||||
tenancy()->endTenancy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,12 @@ class Seed extends SeedCommand
|
||||||
|
|
||||||
// Seed
|
// Seed
|
||||||
parent::handle();
|
parent::handle();
|
||||||
|
|
||||||
|
tenancy()->endTenancy();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($originalTenant) {
|
if ($originalTenant) {
|
||||||
tenancy()->initialize($originalTenant);
|
tenancy()->initialize($originalTenant);
|
||||||
} else {
|
|
||||||
tenancy()->endTenancy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue