mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 11:14:03 +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()
|
||||
{
|
||||
tenancy()->model()::all()->each(function(TenantWithDatabase $tenant) {
|
||||
if (method_exists($tenant, 'domains')) {
|
||||
$tenant->domains()->delete();
|
||||
}
|
||||
|
||||
$tenant->delete();
|
||||
});
|
||||
tenancy()->model()::all()->each->delete();
|
||||
|
||||
return parent::handle();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue