mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 18:14:04 +00:00
Simplify handle method
This commit is contained in:
parent
08b3690fab
commit
4d2d96d894
1 changed files with 1 additions and 7 deletions
|
|
@ -11,13 +11,7 @@ class MigrateFreshOverride extends FreshCommand
|
||||||
{
|
{
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
tenancy()->model()::all()->each(function(TenantWithDatabase $tenant) {
|
tenancy()->model()::all()->each->delete();
|
||||||
if (method_exists($tenant, 'domains')) {
|
|
||||||
$tenant->domains()->delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
$tenant->delete();
|
|
||||||
});
|
|
||||||
|
|
||||||
return parent::handle();
|
return parent::handle();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue