1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 20:54:03 +00:00

Simplify handle method

This commit is contained in:
lukinovec 2022-10-14 14:22:42 +02:00
parent 08b3690fab
commit 4d2d96d894

View file

@ -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();
} }