1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 16:24:04 +00:00

Clean endTenancy() calls at the end of commands

This commit is contained in:
Samuel Štancl 2019-09-27 22:57:10 +02:00
parent 6b103cd2cb
commit 553b162930
5 changed files with 7 additions and 10 deletions

View file

@ -60,12 +60,12 @@ class Migrate extends MigrateCommand
// Migrate
parent::handle();
tenancy()->endTenancy();
});
if ($originalTenant) {
tenancy()->initialize($originalTenant);
} else {
tenancy()->endTenancy();
}
}
}

View file

@ -58,12 +58,12 @@ class Rollback extends RollbackCommand
// Migrate
parent::handle();
tenancy()->endTenancy();
});
if ($originalTenant) {
tenancy()->initialize($originalTenant);
} else {
tenancy()->endTenancy();
}
}
}

View file

@ -60,8 +60,6 @@ class Run extends Command
if ($originalTenant) {
tenancy()->initialize($originalTenant);
} else {
tenancy()->endTenancy();
}
}
}

View file

@ -56,12 +56,12 @@ class Seed extends SeedCommand
// Seed
parent::handle();
tenancy()->endTenancy();
});
if ($originalTenant) {
tenancy()->initialize($originalTenant);
} else {
tenancy()->endTenancy();
}
}
}